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

The Fat Around Your Thighs Might Be Affecting Your Mental Health

New research finds that where fat is stored—not just how much you have—might shape your mood.

New Quantum Navigation System Promises a Backup to GPS — and It’s 50 Times More Accurate

An Australian startup’s device uses Earth's magnetic field to navigate with quantum precision.

Japan Plans to Beam Solar Power from Space to Earth

The Sun never sets in space — and Japan has found a way to harness this unlimited energy.

Could This Saliva Test Catch Deadly Prostate Cancer Early?

Researchers say new genetic test detects aggressive cancers that PSA and MRIs often miss

This Tree Survives Lightning Strikes—and Uses Them to Kill Its Rivals

This rainforest giant thrives when its rivals burn

Engineers Made a Hologram You Can Actually Touch and It Feels Unreal

Users can grasp and manipulate 3D graphics in mid-air.

Musk's DOGE Fires Federal Office That Regulates Tesla's Self-Driving Cars

Mass firings hit regulators overseeing self-driving cars. How convenient.

A Rare 'Micromoon' Is Rising This Weekend and Most People Won’t Notice

Watch out for this weekend's full moon that's a little dimmer, a little smaller — and steeped in seasonal lore.

Climate Change Could Slash Personal Wealth by 40%, New Research Warns

Global warming’s economic toll may be nearly four times worse than once believed

Kawasaki Unveils a Rideable Robot Horse That Runs on Hydrogen and Moves Like an Animal

Four-legged robot rides into the hydrogen-powered future, one gallop at a time.