-
Notifications
You must be signed in to change notification settings - Fork 78
ninjaAndHisFriends.cpp created #131
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
ninjaAndHisFriends.cpp created #131
Conversation
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.
Can we put the problem statement in one line? (instead of) multiple lines?
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.
Suggestion: Add inline comment for the code snippet.
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.
Thanks, @thisabhijeet for your contribution 🎉 . I left a few comments for you to address before this PR gets merged.
thanks a lot for reviewing this PR! changes have been made!
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.
// Problem(3-D DP) :
// We are given an ‘N *M’ matrix.Every cell of the matrix has some chocolates on it, mat[i][j] gives us the number of chocolates.We have two friends ‘Alice’ and ‘Bob’.initially, Alice is standing on the cell(0, 0) and Bob is standing on the cell(0, M - 1).Both of them can move only to the cells below them in these three directions: to the bottom cell(↓), to the bottom-right cell(↘), or to the bottom-left cell(↙). // When Alica and Bob visit a cell, they take all the chocolates from that cell with them. It can happen that they visit the same cell, in that case, the chocolates need to be considered only once. They cannot go out of the boundary of the given matrix, we need to return the maximum number of chocolates that Bob and Alice can together collect.
Uh oh!
There was an error while loading. Please reload this page.
What's being changed:
ninjaAndHisFriends.cpp created
Checkoff the following: