RosettaCodeData/Task/Permutations-by-swapping/J/permutations-by-swapping-2.j

17 lines
193 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
bfsjtn^:(i.!3) bfjt0 3
_1 _2 _3
_1 _3 _2
_3 _1 _2
3 _2 _1
_2 3 _1
_2 _1 3
<:@| bfsjtn^:(i.!3) bfjt0 3
0 1 2
0 2 1
2 0 1
2 1 0
1 2 0
1 0 2
A. <:@| bfsjtn^:(i.!3) bfjt0 3
0 1 4 5 3 2