debug intPartitions method
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user