Question 3: Graph The distances between the places in a small town are shown below: 5 d a 4 2 1 C b 8 10 2 e 6 5 сл Z Wr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 3: Graph The distances between the places in a small town are shown below: 5 d a 4 2 1 C b 8 10 2 e 6 5 сл Z Wr
Question 3: Graph The distances between the places in a small town are shown below: 5 d a 4 2 1 C b 8 10 2 e 6 5 сл Z Write a program that uses graph concept to find lowest bus fare to travel between 2 places using Disjitra algorithm. The program shall fulfil the following requirements: Construct a graph based on the above diagram. Ask user to input origin and destination location. Assume the bus fare rate is RM1.50 per km. Call a function to calculate and display the lowest fare and shortest path from the origin location to destination.