An example of the
array is as follows:
[123,345,567,1235,6435,77,33,444,555,666,111,999,19,101,5542]
It is necessary to find all the combinations composed of the elements (three) in this array. The combinations are as follows
123, 345, 567
1235,6435,77
33,444,555
666,111,999
111,999,19
. . .
n Multiple combinations, each combination is non-repeating (this can be the case 123, 345, 567 345, 123, 567, that is, the order is different)
An example of the
array is as follows:
[123,345,567,1235,6435,77,33,444,555,666,111,999,19,101,5542]
It is necessary to find all the combinations composed of the elements (three) in this array. The combinations are as follows
123, 345, 567
1235,6435,77
33,444,555
666,111,999
111,999,19
. . .
n Multiple combinations, each combination is non-repeating (this can be the case 123, 345, 567 345, 123, 567, that is, the order is different)
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
The whole combination is upstairs, I will add a full arrangement
https://3v4l.org/n4ZXT
Reference: Full arrangement and full combination implementation
Please tell me, can anyone help me
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|