Amadeus Interview Question

Was asked to find the time complexity of a program