1private void helper(List<int[]> combinations, int data[], int start, int end, int index) {
2 if (index == data.length) {
3 int[] combination = data.clone();
4 combinations.add(combination);
5 }
6 else if (start <= end) {
7 data[index] = start;
8 helper(combinations, data, start + 1, end, index + 1);
9 helper(combinations, data, start + 1, end, index);
10 }
11}