Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BSTNode {
- constructor(value) {
- this.value = value;
- this.left = null;
- this.right = null;
- }
- insertLeft(value) {
- let node = new BSTNode(value);
- this.left = node;
- return node;
- }
- inserRight(value) {
- let node = new BSTNode(value);
- this.right = node;
- return node;
- }
- }
Add Comment
Please, Sign In to add comment