Apple interview question

Typical data structures, parsing, flow control, corner case handling