shortest-path
Solution of finding shortest path problem.
Map is matrix N×N of integer numbers.
For instance, this map is given:
2 1 3
5 8 2
7 1 6
The task is to find length of shortest path between (1,1) and (N,N) in matrix. In this case (1,1),(1,2),(1,3),(2,3),(3,3) – will be the shortest path, with length of 14.
Input:
- N - map size
- matrix of map
Output:
- Length (integer) of shortest path found.