Skip to content

Instantly share code, notes, and snippets.

@jcrossley3
Created February 18, 2011 15:02
Show Gist options
  • Save jcrossley3/833765 to your computer and use it in GitHub Desktop.
Save jcrossley3/833765 to your computer and use it in GitHub Desktop.
Quicksort
=========
I happened across a big pile of stuff
And decided that it should be sorted.
The time I could spend was hardly enough,
Any more time could not be afforded.
I picked up a thing, at random, I'm sure,
And to each of the rest I compared it.
I made two more piles of stuff, as it were:
The things found above and below it.
To each of those piles, the same thing I done,
And to those thereafter created.
And not 'til the size of each pile was one --
Were my efforts quite quickly abated.
Hardly a minute of time had passed by,
When I realized something important.
The stuff that had been on that very first pile,
After just a short while, was now sorted!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment