Apple interview question

Khan Academy brain teasers