sorting a list and counting interchanges
Bill Mill
bill.mill at gmail.com
Thu Apr 7 13:59:41 EDT 2005
On 7 Apr 2005 10:44:49 -0700, bearophileHUGS at lycos.com
<bearophileHUGS at lycos.com> wrote:
> Tim's solution is very nice, it comes from basic things often taught in
> good computer science courses.
I dunno, that comes from my Abstract Algebra course a heck of a lot
more than it came from any of my CS classes (I graduated last May)
While I'm at it though, I want to thank Tim for that post. It was one
of those posts where afterwards you say "of course!" but beforehand I
was totally thinking of it the wrong way. Brought me right back to
Abstract.
Peace
Bill Mill
bill.mill at gmail.com
>
> In Python when you have to do many (-1)**n you can do:
> (1-2*(n%2))
> This seems quite faster.
>
> Bearophile
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list