Sorting Visualiser

A sorting algorithm visualizer: step through bubble, selection, insertion, merge, quick and heap sort one comparison at a time, with code and sound.

A frontend app built by Ananda Rizki. More of them at Labs.

Labs — by Ananda Rizki

Sorting Visualiser

Simulator

Sorting algorithms stepped one comparison at a time, with the array, the code pointer, the counters and the sound all rendering the same frame index — the run is traced before anything is drawn, so the pointer cannot drift from the animation and stepping backwards costs exactly what stepping forwards costs. The sound is a Web Audio instrument in about eighty lines, no dependency and no audio files: pitch is the value, mapped exponentially from F3 across 2.2 octaves, so an out-of-order pair falls and a settled one rises.

Built with
  • react
  • tailwind
  • motion
Related

Built by Ananda Rizki, a software engineer and designer, one of the small web apps he writes for fun.

Explore more apps on Labs