On Wed, Dec 04, 2013 at 10:56:32PM -0500, R. Alan Monroe wrote: > 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?
Yes there is, it is called a rank table or an index table, depending on which direction you wish to go. See my earlier post replying to Alan. -- Steven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor