Assignment finished - Completed Main and Bonus exercises #1
@@ -150,6 +150,10 @@ public class MainExercises
|
||||
|
||||
public int[][] intPartitions(int n) {
|
||||
|
||||
if(n == 1){
|
||||
return new int[][]{{1}};
|
||||
}
|
||||
|
||||
ArrayList<int[]> result = new ArrayList<>();
|
||||
int[] current = new int[n]; // current partition, to be built
|
||||
|
||||
|
||||
Reference in New Issue
Block a user