Skip to content

Commit 543ab54

Browse files
Fix formatting issues in CombinationSum class
1 parent 23fc7ef commit 543ab54

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/com/thealgorithms/backtracking/CombinationSum.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
/** Backtracking: pick/not-pick with reuse of candidates. */
88
public class CombinationSum {
99
private CombinationSum() {
10-
throw new UnsupportedOperationException("Utility class");
11-
}
10+
throw new UnsupportedOperationException("Utility class");
11+
}
1212

13-
public static List<List<Integer>> combinationSum(int[] candidates, int target) {
13+
public static List<List<Integer>> combinationSum(int[] candidates, int target) {
1414
List<List<Integer>> results = new ArrayList<>();
1515
if (candidates == null || candidates.length == 0) {
1616
return results;
@@ -22,8 +22,7 @@ public static List<List<Integer>> combinationSum(int[] candidates, int target) {
2222
return results;
2323
}
2424

25-
private static void backtrack(int[] candidates, int remaining, int start,
26-
List<Integer> combination, List<List<Integer>> results) {
25+
private static void backtrack(int[] candidates, int remaining, int start, List<Integer> combination, List<List<Integer>> results) {
2726
if (remaining == 0) {
2827
// Found valid combination; add a copy
2928
results.add(new ArrayList<>(combination));

0 commit comments

Comments
 (0)