Skip to main content
100%

Red-Black Binary Tree

✓ Published1🌍 Public
MMo
Last edited Oct 21, 2020
Created on Oct 21, 2020
Forked from HTML Starter

This example visualizes a red-black binary tree, demonstrating node insertion and layout in real time. It uses D3.js v4 with a force-directed simulation (`d3.forceSimulation`) to position nodes, applying forces for body repulsion, link attraction, and depth-based horizontal/vertical positioning. Users can toggle between SVG and Canvas rendering, with an optional low-resolution Canvas mode on high-DPI displays. The tree structure is built via `d3.binaryTree`, and the code instruments the `insert` method to animate each new node’s placement before re-rendering.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes