Skip to main content
100%

Quicksort I

✓ Published0🌍 Public
Aandressarg
Last edited Aug 15, 2018
Created on Aug 15, 2018

A visualization of the quicksort algorithm shows each row as the array’s state before partitioning, with orange lines marking values left of the pivot that need moving right, and green lines marking right-side values needing moving left. The animation uses SVG line elements scaled by d3.scale.ordinal and rotated via d3.scale.linear, while mouseover and mouseout transitions temporarily rotate lines relative to the pivot value. The code generates 200 shuffled numbers, records each partition step, and renders the sequence using D3 v3 with SVG and animated transitions.

AI-generated description

A visualization of quicksort. Each row represents the state of the array prior to the partition operation. Orange values are left of and greater than the pivot and need to be moved right; green values are right of and less than the pivot and need to be moved left. After these exchanges, the algorithm recurses onto the left and right subarrays.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/63350657ecaf99dbb5ad'>Quicksort I</a>

gpl-3.0 Licensed

Similar vizzes