Skip to content

Instantly share code, notes, and snippets.

@riceball1
Last active April 28, 2017 00:10
Show Gist options
  • Save riceball1/57a03e9bba716b3e40ab158c0006bc52 to your computer and use it in GitHub Desktop.
Save riceball1/57a03e9bba716b3e40ab158c0006bc52 to your computer and use it in GitHub Desktop.
// My own implementation of a BST
class binarySearchTree {
constructor() {
this.left = null;
this.right = null;
this.root = null;
}
insert() {
// first check if root node is empty
// then determine if new value is greater than or lesser than/equal to root
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment