I am not a programmer, but I got a task that could be done manually or algorithmically. Doing it manually is time-consuming and error-prone. I, unfortunately, don't know where to begin.
Given the array [1, 2, 3, 4]
How to reduce it the following way:
[2, 3, 4] 1 out
[1, 3, 4] 2 out
[1, 2, 4] 3 out
[1, 2, 3] 4 out
[3, 4] 1, 2 out
[2, 4] 1, 3 out
[2, 3] 1, 4 out
[1, 4] 2, 3 out
[1, 3] 2, 4 out
[1, 2] 3, 4 out
[4] 1, 2, 3 out
[3] 1, 2, 4 out
[2] 1, 3, 4 out
[1] 2, 3, 4 out
The larger the array, the more variations. The sequence is not random, but there is a pattern that I cannot describe in words.
Thank you