News for hackers. Stuff that matters.
Re:GvR's Blog by bayareaguy on Thursday October 23, 2008 @03:34AM (#340989)
Someone jokingly asked me how I would sort a million 32-bit integers in 2 megabytes of RAM, using Python [...] obviously this is a joke question -- the data alone would take up 4 megabytes, assuming binary encoding

This question seems to come up a lot at Google - didn't their CEO ask it of Obama and McCain when they visited?

I like that instead of going into a complicated solution to a tricky problem, GvR shows the very simple and general way to solve a slightly easier version more people are likely to encounter. Unfortunately I was sort of hoping he would take the Programming Pearls approach instead of treating it as a joke. Bently showed several ways to do this kind of constrained memory sorting given differing assumptions, but perhaps that kind of thing just isn't interesting for the places Python is used.

There are no comments on this comment yet.