Epic interview question

Some basic programming question, not too hard