Login
You're viewing the ruby.social public feed.
  • JobvanderZwan@vis.social
    Jan 5, 2026, 2:21 PM

    Visualizing sorting algorithms is fun.

    A so-called "rug" visualization of a sorting algorithm I'm messing around with, using a rainbow palette. The x-axis represents time, and each step is a comparison and a swap. The y-axis is the array being sorted, each row representing the value at the equivalent position in the array. The unsorted input starts on the left and it ends with the sorted result on the right.

In this case, because the input array were two interleaved ascending arrays (i.e. 0, 400, 1, 401, 2, 402, and so on) the result looks like a highly regular weave being untangled.
    💬 0🔄 4⭐ 18