Apptopia interview question

Coding challenge