I am trying to implement an algorithm that calculates the shortest path from the far left (A) to the far right node (B).
For example:
-----------------------------------------------
| |
| x |
| x |
| |
| x |
| A x |
| x |
| B |
| x |
-----------------------------------------------
So far I have an adjacency matrix. I have tried to implement this using Dijkstra's algorithm, but I only get the distance using this algorithm, I would also need the path information (which nodes are passed?).
How could I implement this?