Problem Description:
The Flying Traveller Airline Company (FTAir) wants a program to process customer requests to fly from some origin city to some destination city. For each customer, indicate whether a sequence of FTAir flights from the origin city to the destination city exists and produce the itinerary - sequence of flights.
Input:
Three input text files that specify all the flights information as follow:
• The names of cities that FTAir serves (at least 15 cities).
Example:
A
B
C
D
E
F
• Pairs of city names; each pair represents the origin and destination of one of FTAir's flights.
Example:
A->B
C->D
E->F
F->G
G->B
• Pair of city names; each pair represents a request to fly from some origin city to some destination (at least 5 requests with different scenarios).Each request considered a one-way flight.
Rules:
• Find a path from origin city to destination city, if exists.
• Maintain information about the order in which it visits the cities.
• Do not visit a city more than once.
• If there are multiple paths, you may list them all and find least visited cities.
Solutions methods (Both also need):
1. Use Stacks
2. Use Recursions
Output:
1.Show the path If there have the route from the origin place to destination place.
if request from F to B
the C++ program should display the possible path
F->G
G->B