[Tutor] Generate list-of-transforms
Danny Yoo
dyoo at hashcollision.org
Thu Dec 5 07:25:46 CET 2013
I believe you're asking for the term "Cycle notation".
http://en.wikipedia.org/wiki/Cycle_notation
On Wed, Dec 4, 2013 at 7:56 PM, R. Alan Monroe <amonroe at columbus.rr.com>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?
> 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
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131204/ef4470ea/attachment-0001.html>
More information about the Tutor
mailing list