Traveloka Interview Question

Logic question and android specific question.