Wizeline interview question

Basic algorithms