Sorting is a key algorithm and something every programmer should understand. I Programmer has often taken an interest in new ways of displaying sorting in action, even extending to Hungarian Dances. Now we have another animation to add to our collection and it is very, very nice.
Carlo Zapponi is a data visualization guy at the London offices of the Guardian newspaper. He is also a fervent enthusiast of showing how things are - with as much artistic value as possible.
One of his most recent projects, which we missed when it was brand new, is to show sorting algorithms in a way that is both informative and pleasing.
The basic idea is to show how elements are moved around to achieve the sort order. The diagrams show which pairs of elements are swapped as the sort progresses. Below each diagram is a graph showing how out of order the array is. If you want to understand what is going on then my advice is to try the Bubble Sort example by clicking the + add method icon and selecting it from the list:
Bubble sort is never a good choice of algorithm except when its simplicity is an advantages and here it most certainly is. You can see the scan move up the array swapping elements that are out of order while you watch the graph showing how out of order the elements are slowly decrease.
For a more complex sort you need some help in understanding some of the symbols because not all sorts are simple swaps of elements in the array. For example, there might be an element stored in memory outside of the array. If you select the help symbol you can see a legend:
Another shortcut worth knowing is that if you select the W in the top right-hand corner of each sorting method you will be taken directly to the Wikipedia entry for the sorting method.
The whole presentation was so impressive that it was used as an exhibit in "Art of Algorithm" at the annual London Design Festival. Which goes to prove, yet again, that code can be beautiful.
Finally, I can't help but mention the always amazing Sorting Algorithms as Dances. If you haven't already seen it then you are in for a treat. If you have you may want to indulge in a re-run.
More Information
Related Articles
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Vibe Coding Is Collins Word of the Year 2025
09/11/2025
Collins has selected Vibe Coding as its Word of the Year 2025, reflecting the current trend towards the use of natural language prompts for code creation.
Scouting America Launches AI And Cybersecurity Badges
24/10/2025
Scouting America, the organization formerly known in the U.S.A. as the Boy Scouts, has announced two new merit badges in artificial intelligence (AI) and cybersecurity. The badges are available throug [ ... ]
- GitHub Copilot CLI And Spaces In Preview
- Europe Gets Its Own LLM
- Mico - A Personality For Copilot
- Eclipse Foundation Adds Agentic Functionality To Eclipse LMOS
- Edera Open Sources Sprout
- W3C Adopts A New Logo
- IBM Launches Granite Version 4.0 and Granite-Docling
- Visual Studio Adds Planning Mode To Copilot
- Apache Grails 7.0 Released
- Robotic Gut Spider For Exploring Digestive Tract
- Insectile Garments For Dutch Design Week
- TestSprite 2.0 Sees User Growth
- Missing The Point Of LLMs
Comments
or email your comment to: comments@i-programmer.info