Im not sure if this is expected behavior or not? I noticed that BSTree.remove() will not remove the node if it is the last one/root node in the tree?
assuming:
var tree = new BSTree();
// tree._count = 0
tree = tree.insert(100, 'yay');
//tree._count = 1
tree = tree.remove(100);
//tree._count = 1 (expecting 0)
It appears that the BSTree will not remove the root node once one has been added. Is this correct/expected behavior?
Thanks!