Skip to content
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

[C++ Dynamic Programming Enhancement] Add multiple knapsack & brute force/memo solutions #1654

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Phoenix8215
Copy link

This Pull Request enhances the dynamic programming section of the C++ code in the “hello algo” project by adding new examples and approaches:

  • Unbounded Knapsack (Complete Knapsack)
    Added brute force (recursive) solution and memoized solution to show top-down approaches alongside the existing bottom-up DP.

  • Multiple Knapsack Problem
    Introduced a new complete code example for the multiple knapsack problem, illustrating how it differs from the 0/1 and unbounded knapsack problems.

  • Coin Change Problem
    Added brute force and memoized (top-down) solutions, so readers can compare different strategies (recursive vs. DP) for the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant