This uses a different recursive strategy. I need one that refers to it's previous set size rather than the previous n.
Type: Posts; User: inevitable
This uses a different recursive strategy. I need one that refers to it's previous set size rather than the previous n.
I realized you have to recurse on size-1 and then iterate each with a number in front. i.e.
for an input of size 5, the size 2 array will be:
12
13
14
15
23
24
25
How do you write a recursive algorithm for finding all the subsets of a given number:
i.e if 2 is entered it should give
1,2,12
and if it is 3
1,2,3,12,13,23,123
It has to be recursive and has...