Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
69
var assert = require('assert');
class BST {
constructor(val) {
this.root = new Node(val);
}
add(val) {
// fill this in
}
remove(val) {
// fill this in
}
}
// const bst = new BST(4);
// bst.add(3);
// bst.add(5);
// console.log(bst.root.left.val === 3);
// console.log(bst.root.right.val === 5);
function Node(val) {
this.val = val;
this.left = null;
this.right = null;
}
OUTPUT
Results will appear here.