Given n and k, I need to generate all of the following sequences:
n=5, k=2
0,1,2
0,1,3
0,1,4
1,2,3
1,2,4
2,3,4
Another example:
n=5, k=3
0,1,2,3
0,1,2,4
0,1,3,4
0,2,3,4
1,2,3,4
I think this can be solved using recursion, but got stuck. Need help