Amadeus interview question

Mainly C++ and some algorithms.