JAN interview question

algorithms