Skip to content

Commit 97e1c73

Browse files
committed
Fixes Clang Format
1 parent 6f67f1f commit 97e1c73

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/thealgorithms/dynamicprogramming/SubsetSum.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ private SubsetSum() {
99
*
1010
* @param arr the array containing integers.
1111
* @param sum the target sum of the subset.
12-
* @return {@code true} if a subset exists that sums to the given value, otherwise {@code false}.
12+
* @return {@code true} if a subset exists that sums to the given value,
13+
* otherwise {@code false}.
1314
*/
1415
public static boolean subsetSum(int[] arr, int sum) {
1516
int n = arr.length;
1617

17-
//Intialize Two Arrays to store current and prev states
18+
// Intialize Two Arrays to store current and prev states
1819
boolean[] isSumCurr = new boolean[sum + 1];
19-
boolean[] isSumPrev = new boolean[sum+1];
20+
boolean[] isSumPrev = new boolean[sum + 1];
2021

21-
// Mark prev[0] = true as it is true to make sum = 0
22-
// using 0 elements
22+
// Mark prev[0] = true as it is true to make sum = 0 using 0 elements
2323
isSumPrev[0] = true;
2424

2525
// Fill the subset sum matrix

0 commit comments

Comments
 (0)