Skip to content

bplustree typescript implementation

Notifications You must be signed in to change notification settings

moe-view/bplustree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bplustree typescript

Usage

const compareFunc = (n1: number, n2: number) => {
  if (n1 < n2) {
    return -1;
  }
  if (n1 === n2) {
    return 0;
  }

  return 1;
};

const bPlusTreeOrder = 4;
const bTree = new BPlusTree<number>(bPlusTreeOrder, compareFunc, [1,2,3,4,5,6]);

bTree.insert(7);
bTree.insert(8);
bTree.delete(1);
bTree.delete(2);

Test

<!-- spec test -->
yarn test
<!-- performance test -->
yarn test:perf

Demo

B+tree visualization

About

bplustree typescript implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published