I'm trying to code a combinational algorithm and I'm struggling a little bit.
I am looking to generate every possible, unique 4 digit array from these 10 numbers.
eg.
numbers = [1,2,3,4,5,6,7,8,9,10]
length = 4
Output:
1,2,3,4
1,2,3,5
1,2,3,6
...
...
...
6,7,1,2
6,7,1,3
etc
etc
Can anyone offer any advice?
I am looking to generate every possible, unique 4 digit array from these 10 numbers.
eg.
numbers = [1,2,3,4,5,6,7,8,9,10]
length = 4
Output:
1,2,3,4
1,2,3,5
1,2,3,6
...
...
...
6,7,1,2
6,7,1,3
etc
etc
Can anyone offer any advice?