Agriya interview question

Technical