dpaukov / combinatoricslib3

Combinatorial objects stream generators for Java.
Apache License 2.0
177 stars 24 forks source link

k-Permutations - ordering of elements #11

Open axkr opened 3 years ago

axkr commented 3 years ago

From your k-Permutations example:

This will print six 2-permutations of (1, 2, 3):

   [1, 2]
   [2, 1]
   [1, 3]
   [3, 1]
   [2, 3]
   [3, 2]

How can I make the "sort ascending by column"?

   [1, 2]
   [1, 3]
   [2, 1]
   [2, 3]
   [3, 1]
   [3, 2]