Skip to main content
100%

Shuffle I

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

A Fisher–Yates shuffle is animated as 200 vertical line segments, each rotating to illustrate the random swapping of array positions. The visualization uses D3.js v3 with SVG and a transition system that chains animations step-by-step, reversing the shuffle steps to trace the algorithm’s progression. The `d3.scale.ordinal` and `d3.scale.linear` maps data indices to x-coordinates and rotation angles, while the `shuffle` function generates swap pairs for the animation sequence.

AI-generated description

An animation of Fisher–Yates shuffle.

gpl-3.0 Licensed

Similar vizzes