20 Feb PMCA Sunday 12:00 Java Homework 20.02.16.
Problem Description
Find the shortest distance between any two vertices in the graph:
The input contains two integers which contain the starting node and the ending node. The output should contain the distance between two nodes
Sample Input 1:
0
5
Sample Output 1:
9
Explanation:
Shortest between nodes 0 and 5 is 9. The route is 0-2-3-5
Sample Input 2:
4
5
Sample Output 2:
3
Explanation:
Shortest between nodes 4 and 5 is 3. The route is 4-3-5
You can download starting code by clicking the following link:
if the file does not show up, please reload the page.
Sorry, the comment form is closed at this time.