Skip to content

Instantly share code, notes, and snippets.

@kingsleytan
Created October 8, 2019 06:23
Show Gist options
  • Save kingsleytan/40815aaf8c92e1c1dcb9f5ba6efaeb58 to your computer and use it in GitHub Desktop.
Save kingsleytan/40815aaf8c92e1c1dcb9f5ba6efaeb58 to your computer and use it in GitHub Desktop.
const bst = new BST();
bst.add(4);
bst.add(2);
bst.add(6);
bst.add(1);
bst.add(3);
bst.add(5);
bst.add(7);
bst.remove(4);
console.log(bst.findMin());
console.log(bst.findMax());
bst.remove(7);
console.log(bst.findMax());
console.log(bst.isPresent(4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment