Created
October 8, 2019 06:23
-
-
Save kingsleytan/40815aaf8c92e1c1dcb9f5ba6efaeb58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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