Orbitz Worldwide interview question

I didn't expect the brainteaser problem.