Skip to content

Commit

Permalink
Update Unbounded_0_1_Knapsack.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
yeolesanskruti authored Oct 13, 2024
1 parent 4f17fb8 commit 0cf4734
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dynamic_programming/Unbounded_0_1_Knapsack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ namespace unbounded_knapsack {
* @param i Current index in the value and weight vectors.
* @param W Remaining capacity of the knapsack.
* @param val Vector of values corresponding to the items.
* @note "val" data type can be changed according to the size of the input.
* @param wt Vector of weights corresponding to the items.
* @note "wt" data type can be changed according to the size of the input.
* @param dp 2D vector for memoization to avoid redundant calculations.
* @return The maximum value that can be obtained for the given index and capacity.
*/
Expand Down

0 comments on commit 0cf4734

Please sign in to comment.