-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Added minimum cost path algorithm #2135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What is the use case for this algorithm? What would be the real world value of solving this problem? |
I encountered it a long time back as a problem stating something like: "There is a gold digger travelling from the top left of the grid to the bottom right, help him maximize the gold he encounters on the path". Another variant of the problem can be considered quite useful, minimum path sum for matrix (can be done by changing the max of the top and left to the min of the two). If we, consider the path of a traveler in a N x M grid, the value for in the matrix can be considered accommodation cost and we are trying to minimize it. |
Let me know if its not worth adding. I'll close it. Planning to LRU Cache, but I can't understand where (which folder) I should add it in. Could you please tell me @cclauss ? |
@ruppysuppy please add a description for this algorithm |
@itsvinayak should I change it to minimum cost path from maximum cost path? I'll add the description for the problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I need more description?
* Added maximum path sum for matrix (top left to bottom right) * Changed maximum cost path to minimum cost path + added video explaination
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.