Dynamic Programming Shortest Path Algorithm In C