dijk: Implement dijkstra's algorithm

Also add a helper function to print the finalized weights
and parents, so as to confirm that the result is correct.

Signed-off-by: Prashant Malani <p.malani@gmail.com>