A BTree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time.
import { BTree } from "collection-kit";
import { BTree } from "collection-kit";
const tree = new BTree(3); // order 3
tree.insert(10);
tree.insert(20);
tree.insert(5);
tree.insert(15);
console.log("Search 15:", tree.search(15)); // true