Apple interview question

Some basic algorithm and data structure questions