Continental interview question

General programing questions, logic based