I have some trouble with generating all variants of arrays from a number. For example if I have the number 3, I need to get the following arrays:
[1].
[2],
[3],
[1, 2],
[1, 2, 3],
[1, 3]
Order of the numbers in the arrays does not matter.
I have some trouble with generating all variants of arrays from a number. For example if I have the number 3, I need to get the following arrays:
[1].
[2],
[3],
[1, 2],
[1, 2, 3],
[1, 3]
Order of the numbers in the arrays does not matter.