public List<List<Integer>> combine(int n, int k) {

List<List<Integer>> result = new ArrayList<List<Integer>>();

```
aux(result, n, 1, k, new Stack<Integer>());
return result;
}
private void aux(List<List<Integer>> result, int n, int currentIndex, int currentK, Stack<Integer> numbers){
if(currentK == 0){
result.add(new ArrayList<Integer>(numbers));
return;
}
for(int i = currentIndex; i <= n-currentK+1; i++){
numbers.push(i);
aux(result, n, i+1, currentK-1, numbers);
numbers.pop();
}
}
```