Permutations by swapping: Difference between revisions

m
Line 15:
=={{header|J}}==
 
J's has a built in mechanism for [http://www.jsoftware.com/help/dictionary/dacapdot.htm generatingrepresenting permutations] (which is designed around the idea of selecting a permutation uniquely by an integer) but it does not seem seem to have an obvious mapping to Steinhaus–Johnson–Trotter. Perhaps someone with a sufficiently deep view of the subject of permutations can find a direct mapping?
 
Meanwhile, here's an inductive approach, using negative integers to look left and positive integers to look right:
6,962

edits