homehome Home chatchat Notifications


What sorting algorithms look and sound like

I wish these were around during my first computer science course.

Tibi Puiu
May 31, 2016 @ 6:13 pm

share Share

sorting algorithms

Credit: Timo Bingmann

Sorting algorithms are fundamental to computer science for the same reason sorting is important in your day to day life. It’s a lot easier to find things when they’re in order, which saves time and energy. Depending on how you need an array sorted, there are many sorting algorithms that you can use. Timo Bingmann made a software called Sound of Sorting which “both visualizes the algorithms internals and their operations, and generates sound effects from the values being compared.”

You can get a glimpse of how it works in this video produced by Bingmann.

The white bars represent the value of the array position corresponding to the x-axis. When an array item is set, the white bar turns red. A swap operation is two bars turning red which represents their values is being exchanged.

The sound’s frequency is calculated for each set of compared values. The sound wave is triangular and modulated to sound like an “8-bit game”, which is either very fitting or excruciatingly annoying.

You can download the software program here and then make your own sounds and videos.

share Share

Beetles Conquered Earth by Evolving a Tiny Chemical Factory

There are around 66,000 species of rove beetles and one researcher proposes it's because of one special gland.

These researchers counted the trees in China using lasers

The answer is 142 billion. Plus or minus a few, of course.

New Diagnostic Breakthrough Identifies Bacteria With Almost 100% Precision in Hours, Not Days

A new method identifies deadly pathogens with nearly perfect accuracy in just three hours.

This Tamagotchi Vape Dies If You Don’t Keep Puffing

Yes. You read that correctly. The Stupid Hackathon is an event like no other.

Wild Chimps Build Flexible Tools with Impressive Engineering Skills

Chimpanzees select and engineer tools with surprising mechanical precision to extract termites.

Archaeologists in Egypt discovered a 3,600-Year-Old pharaoh. But we have no idea who he is

An ancient royal tomb deep beneath the Egyptian desert reveals more questions than answers.

Researchers create a new type of "time crystal" inside a diamond

“It’s an entirely new phase of matter.”

Strong Arguments Matter More Than Grammar in English Essays as a Second Language

Grammar takes a backseat to argumentation, a new study from Japan suggests.

A New Study Reveals AI Is Hiding Its True Intent and It's Getting Better At It

The more you try to get AI to talk about what it's doing, the sneakier it gets.

Cat Owners Wanted for Science: Help Crack the Genetic Code of Felines

Cats are beloved family members in tens of millions of households, but we know surprisingly little about their genes.