Amadeus Interview Question

Define time and space complexity