Monday 30 September 2019

A Misift Among Misfits - Quicksort

I think of the world
Like a bunch of arrays
That we all inhabit
Throughout our days

Some sorted with bubble
Other through insertion
But some special arrays
Get a different version

For that version is quick
So fast and cruel
But for modern society
It is a vital tool

See, we all have a number
A value of our worth
It is given to us
From the time of our birth

Some of us get lucky
Others not so much
We either work to make it better
Or use it as a crutch

No matter the situation
We are all in one place
And someone among us
Gets to be the deciding face

That person is the pivot
And you’re either left or right
Left is lesser, right is better
So is the sorting plight

It would be simple, if we each had one value
But to tell you the truth, that is frankly a lie
We have many numbers, all judged on different merits
Some of them are low, and some of them are high

And as each sort is made
Groups shrink each time
Some will make you feel fine
Others seem like a sentence to a crime

But don’t fret too much
For you may be a pivot too
Saying who is left and who is right
One day that could be you

When that time comes
You’ll be left in your own slot
At least you had some fun
Being the big shot

At the end, it all gets sorted
Each person in their place
Knowing where they’re in the hierarchy
After being judged by face after face

No comments:

Post a Comment