Apple interview question

Solve a Software Engineering problem