Public
Edited
May 20, 2024
24 forks
1 star
Insert cell
Insert cell
import { SplayTree, Node, draw as drawTree } from "@esperanc/splay-trees"
Insert cell
import { Heap, draw as drawHeap } from "@esperanc/binary-heaps"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
drawTree(charFreqTree)
Insert cell
Insert cell
Insert cell
drawHeap(charFreqHeap)
Insert cell
Insert cell
Insert cell
drawTree(huffmanTree)
Insert cell
Insert cell
Insert cell
drawTree(characterCodesTree)
Insert cell
Insert cell
codedText = {
let result = "";
for (let ch of inputText) {
characterCodesTree.splay(ch);
result += characterCodesTree.node.value + " ";
}
return result;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more