Skip to main content
100%

Quicksort IV

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on May 29, 2014

The visualization animates the quicksort algorithm on 200 shuffled values, rendering each value as a rotated vertical line whose angle reflects its magnitude. A red line marks the active pivot, while black lines indicate the current partition and gray lines show inactive regions. Using D3.js v3 and SVG, the animation replays recorded swap and partition actions in reverse order, updating line positions and classes via `d3.transition`. The code generates the action log by recursively partitioning the array, then drives the playback through chained transition callbacks.

AI-generated description

An improved quicksort animation showing the active partition in black and the active pivot in red.

gpl-3.0 Licensed

Similar vizzes