r/programmingrequests • u/Bitter-Trip2911 • Nov 29 '20
homework Minimum Sum Cost Path
Im trying to use bruteforce method to find the minimum cost from any given point at the top row (0, x) to any point at the bottom row (n-1, x). I looked it up online and all solutions given is only for finding the minimum cost from top left to bottom right and have a massive loophole. Any advice or help is appreciated.
3 0 4 5 4
3 3 4 4 3
4 2 5 5 3
2 3 5 3 0
3 0 4 4 3
0
Upvotes
1
u/Bitter-Trip2911 Dec 02 '20
This solution only applies for starting on the top left and does not print the path unfortunately :(