Sorting algorithms visualized

This will be lost on many of you, but to the programmers this will make perfect sense. Basically, when programming, there are a lot of times when you have a long list of numbers or words that you'll want sorted greatest to least or alphabetically. The way this is done will vary by what algorithm you use. Aldo Cortesi visualizes these sorting algorithms, showing just how each one works.

If you're confused but still interested, here's a simple example.

Let's say you have a list of numbers from one to five listed as such: 4, 20, 6, 12, 100. We want to organize these systematically least to greatest. The easiest way would be to setup five "spots" and then go through each number, starting at the beginning, and decide if the number is bigger or smaller than the number we already looked at. That's not the most efficient way to do it though, and when you have millions of numbers to sort, instead of just five, then efficiency matters.

[Thanks, Marlena]

1 Comment

Favorites

How We Spend Our Money, a Breakdown

We know spending changes when you have more money. Here’s by how much.

Pizza Place Geography

Most of the major pizza chains are within a 5-mile radius of where I live, so I have my pick, …

Think Like a Statistician – Without the Math

I call myself a statistician, because, well, I’m a statistics graduate student. However, the most important things I’ve learned are less formal, but have proven extremely useful when working/playing with data.

Watching the growth of Walmart – now with 100% more Sam’s Club

The ever so popular Walmart growth map gets an update, and yes, it still looks like a wildfire. Sam’s Club follows soon after, although not nearly as vigorously.