Question: have a direct connection ( be friends ) , the lowest cost path may take a different route. Here, Umar and Lema have a direct
have a direct connection be friends the lowest cost path may take a different route. Here, Umar and Lema have a direct connection of weight but the lowest cost path is weight and traverses nodes.
Enter the starting name x to quit: Umar
Enter the ending name textrmxmathrm to quit: Lema
The best path between these two people is:
Umar
Saim Shah Hamdani
Arwen
Sara
Lema
The cost of this path is:
Enter the starting name textrmxmathrm to quit: Tommy
Enter the ending name textrmxmathrm to quit: Amir
The best path between these two people is:
Tommy
Mohsin Khan
Dennis
Umar Patek
Amir
The cost of this path is:
Enter the starting name textrmxmathrm to quit: Gabriel
Enter the ending name x to quit: Varga Melinda
There is NOT a path between these two people.
Enter the starting name textrmxmathrm to quit: x
Exiting...
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
