Agoda interview question

typical problems from a leetcode (not data science)