Dynamic Programming Shortest Path