1

Ive read many post about how to generate unique random sequences, yet none about how to get all unique sequences from an given array.

ex. i have an array like so: [1,2,3,4]

I need to come up with some logic on how to obtain an list of int array's containing all (unique) sequences that can be made from that array.
[1,2,3,4]
[1,2,4,3]
[1,3,2,4]
[1,3,4,2]
[1,4,2,3]
[1,4,3,2]
etc etc...

This thing is eating me, pseudo this didn't look hard at all, but either I'm missing something obvious or this is some advanced task.

Thanks in advance!

0 Answers0