Agoda interview question

Structure thinking questions, and math