The Perfect Sorting Algorithm

Simon showed us this guessing game where we had to guess the correct sequence of cards with numbers 1, 2, 3, 4 while the cards are all flipped upside down. It sound like a simple little thing but it has deep implications for understanding how sorting algorithms work.

It’s really about showing what the best sorting algorithm. No sorting algorithm that has a better worst-case scenario than n log n.

Simon’s diagram of all the possible permutations of four objects

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s