-1

I've tried to Google this question but I can't seem to find results to from a data set get a permutation of a pair of numbers. (java) For example given

1 2 3 4 5 6 7 8 9 10

how and is it possible, to get permutations like

1,2

then

2,3

I'm not asking for the possibilities.

EDIT:

Another example give

1 2 3

I'm asking for a way to be able to get

1,2
2,1
2,3
3,2
3,1
1,3

and so on.

4

1 に答える 1