Skip to content

Commit 20195f1

Browse files
Update Unbounded_0_1_Knapsack.cpp
1 parent 783b156 commit 20195f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dynamic_programming/Unbounded_0_1_Knapsack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace unbounded_knapsack {
5454
* @param dp 2D vector for memoization to avoid redundant calculations.
5555
* @return The maximum value that can be obtained for the given index and capacity.
5656
*/
57-
uint16_t KnapSackFilling(std::uint16_t i, std::uint16_t W,
57+
std::uint16_t KnapSackFilling(std::uint16_t i, std::uint16_t W,
5858
const std::vector<std::uint16_t>& val,
5959
const std::vector<std::uint16_t>& wt,
6060
std::vector<std::vector<int>>& dp) {
@@ -84,7 +84,7 @@ uint16_t KnapSackFilling(std::uint16_t i, std::uint16_t W,
8484
* @param wt Vector of weights corresponding to the items.
8585
* @return The maximum value that can be obtained for the given capacity.
8686
*/
87-
uint16_t unboundedKnapsack(std::uint16_t N, std::uint16_t W,
87+
std::uint16_t unboundedKnapsack(std::uint16_t N, std::uint16_t W,
8888
const std::vector<std::uint16_t>& val,
8989
const std::vector<std::uint16_t>& wt) {
9090
if(N==0)return 0; // Expect 0 since no items

0 commit comments

Comments
 (0)