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

Update 0_1_knapsack.cpp #2852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 17, 2024

  1. Update 0_1_knapsack.cpp

    fix(knapsack): correct array size calculation and test case simplification
    
    - Removed incorrect size calculation using sizeof and replaced it with std::array's size method.
    - Simplified test cases by directly using the array size as inferred by std::array.
    - Updated comments for clarity and code readability.
    - Ensured correct logic flow for 0-1 Knapsack dynamic programming solution.
    
    This commit fixes logical errors in the array size handling and makes the code more robust and easy to maintain.
    ShanawazAlam007 authored Oct 17, 2024
    Configuration menu
    Copy the full SHA
    6576bf6 View commit details
    Browse the repository at this point in the history