debug intPartitions method

This commit is contained in:
2026-04-22 23:10:29 +03:30
parent 2f72c0c8b6
commit aa6cdc766d
+4
View File
@@ -150,6 +150,10 @@ public class MainExercises
public int[][] intPartitions(int n) { public int[][] intPartitions(int n) {
if(n == 1){
return new int[][]{{1}};
}
ArrayList<int[]> result = new ArrayList<>(); ArrayList<int[]> result = new ArrayList<>();
int[] current = new int[n]; // current partition, to be built int[] current = new int[n]; // current partition, to be built