When a user wants to choose to fly from A to B, suggest the flight with lowest fare that's available, here its A1, if A1 is busy then A2 and so on Repeat the same for B to A.
Am I missing something here? Complexity is O( (number of flights from A to B) + number of flights from B to A) ) Cheers 'Coding is an art' -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
