Skip to content

Commit 6c63dfe

Browse files
committed
fix: Fix spaces between comments
1 parent 4089fc9 commit 6c63dfe

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

dynamic_programming/0_1_knapsack.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
#include <iostream>
44

55
// void Print(int res[20][20], int i, int j, int capacity)
6-
//{
7-
// if(i==0 || j==0)
8-
// {
9-
// return;
6+
// {
7+
// if(i==0 || j==0)
8+
// {
9+
// return;
1010
// }
11-
// if(res[i-1][j]==res[i][j-1])
12-
// {
13-
// if(i<=capacity)
14-
// {
15-
// cout<<i<<" ";
16-
// }
11+
// if(res[i-1][j]==res[i][j-1])
12+
// {
13+
// if(i<=capacity)
14+
// {
15+
// std::cout<<i<<" ";
16+
// }
1717
//
18-
// Print(res, i-1, j-1, capacity-i);
19-
// }
20-
// else if(res[i-1][j]>res[i][j-1])
21-
// {
22-
// Print(res, i-1,j, capacity);
23-
// }
24-
// else if(res[i][j-1]>res[i-1][j])
25-
// {
26-
// Print(res, i,j-1, capacity);
27-
// }
28-
//}
18+
// Print(res, i-1, j-1, capacity-i);
19+
// }
20+
// else if(res[i-1][j]>res[i][j-1])
21+
// {
22+
// Print(res, i-1,j, capacity);
23+
// }
24+
// else if(res[i][j-1]>res[i-1][j])
25+
// {
26+
// Print(res, i,j-1, capacity);
27+
// }
28+
// }
2929

3030
int Knapsack(int capacity, int n, int weight[], int value[]) {
3131
int res[20][20];

0 commit comments

Comments
 (0)