[Tutor] Generate list-of-transforms

R. Alan Monroe amonroe at columbus.rr.com
Thu Dec 5 04:56:32 CET 2013


Given two lists, before and after a sort:
         0 1 2 3 4
         ---------
before:  3 1 2 5 4
after:   1 2 3 4 5

Is there a well-known algorithm that can give me the
list-of-transforms that got me from before to after?
e.g.:

first-to-zeroth,
zeroth-to-second,
second-to-first

fourth-to-third
third-to-fourth

This seems like the kind of thing that probably exists, but there
isn't a simple googlable term for searching it out conveniently.

Alan



More information about the Tutor mailing list