Guest User

Untitled

a guest
Jan 23rd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class BSTNode {
  2. constructor(value) {
  3. this.value = value;
  4. this.left = null;
  5. this.right = null;
  6. }
  7.  
  8. insertLeft(value) {
  9. let node = new BSTNode(value);
  10. this.left = node;
  11. return node;
  12. }
  13.  
  14. inserRight(value) {
  15. let node = new BSTNode(value);
  16. this.right = node;
  17. return node;
  18. }
  19. }
Add Comment
Please, Sign In to add comment