Question: Write a c + + program to find the shortest route in an airline network from a given start city to a given destination city
Write a c program to find the shortest route in an airline network from a given start city to a given destination city using Depth First Search.
Should be three files: airline.h airline.cpp and airlineMain.cpp
An unweighted digraph represented by its adjacency list is used for the network, and the information needed to construct is below.
Network file content:
LosAngeles
SanFrancisco
Denver
Chicago
Boston
NewYork
Miami
NewOrleans
The order of cities are arranged from LA SAN DEN CHI BOS NYK MIA NOLFirst digit is the number of outdegrees; other digits are the destinations of outdegrees.
Example: New Orleans : New Orleans connects to LA and MIA
Sample Output with airline map
Number of start city?
Number of destination?
Shortest path from Los Angeles to San Francisco is:
LosAngeles
v
Denver
I
v
SanFrancisco
More Y or NY
Number of start city?
Number of destination?
Shortest path from New York to Chicago is:
NewYork
I
v
Chicago
More Y or Ny
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
