A visualisation of insertions in a self-balancing red-black binary tree.
Red-black binary tree implementation in d3-quant, single code base visualisations on svg and canvas thanks to d3-canvas-transition module.
forked from lsbardel's block: Red-Black Binary Tree
xxxxxxxxxx
<html lang="en">
<head>
<meta charset="utf-8">
<title>Red-Black Binary Tree</title>
<script src="https://d3js.org/d3.v4.js"></script>
<script src="https://giottojs.org/d3-canvas-transition/0.3.4/d3-canvas-transition.js"></script>
<script src="https://giottojs.org/d3-quant/0.4.2/d3-quant.js"></script>
<style>
#panel {
background-color: rgba(245,245,245,0.9);
padding: 5px;
position: absolute;
display: block;
}
</style>
</head>
<body>
<div id="panel">
<div id="paper">
<label>
<input id='svg' name="type" type="radio" checked>
<span>svg</span>
</label>
<label>
<input id='canvas' name="type" type="radio">
<span>canvas</span>
</label>
</div>
</div>
<div id="example" style="max-width: 960px"></div>
<script src="./script.js">
</script>
</body>
https://d3js.org/d3.v4.js
https://giottojs.org/d3-canvas-transition/0.3.4/d3-canvas-transition.js
https://giottojs.org/d3-quant/0.4.2/d3-quant.js