-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Create Unbounded_knapsack.cpp #2786
Create Unbounded_knapsack.cpp #2786
Conversation
Sure @realstealthninja I would update the PR soon. |
Documentation done.
I have updated the documentation and code accordingly. Please review @realstealthninja . |
Co-authored-by: realstealthninja <[email protected]>
Co-authored-by: realstealthninja <[email protected]>
Co-authored-by: realstealthninja <[email protected]>
Co-authored-by: realstealthninja <[email protected]>
@realstealthninja I have updated accordingly. Please review. |
Co-authored-by: realstealthninja <[email protected]>
Co-authored-by: realstealthninja <[email protected]>
@realstealthninja I have updated the file accordingly. Please review. |
@realstealthninja done all changes accordingly. |
@realstealthninja all changes are done accordingly. Hope so code is ready for merge |
@realstealthninja done. Hope that file is ready for the merge now. |
@realstealthninja No, in the standard unbounded knapsack problem, the maximum value cannot be negative. The problem is designed to maximize the total value of items placed in the knapsack, and item values are typically non-negative. If all items have zero or negative values, the optimal solution would be to select no items, resulting in a maximum value of 0. Thus, the maximum value is always non-negative. |
oh i see! thanks for the clarification |
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.
LGTM thanks for this ❤️
Allow me to work on this , I am kinda late to hacktober so want to complete my PRs |
Description of Change
Issue - #2782
Added Unbounded Knapsack Algorithm in Dp section with algorithm, task and test cases. Also code is verified using gfg ide.
For reference :
Checklist
Notes:
Please review and suggest changes if any @realstealthninja