We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original question
let tree = new BinarySearchTree tree.add(1, 2, 3, 4) tree.add(5) tree.has(2) // true tree.has(5) // true tree.remove(3) // undefined tree.size() // 3
Should be tree.size() // 4 (total number of nodes)
tree.size() // 4
Or maybe tree.depth() // 3 (highest distance from root, in case it is not self-balancing BST)
tree.depth() // 3
The text was updated successfully, but these errors were encountered:
Typo - good catch @artin-phares!
Sorry, something went wrong.
No branches or pull requests
Original question
Should be
tree.size() // 4
(total number of nodes)Or maybe
tree.depth() // 3
(highest distance from root, in case it is not self-balancing BST)The text was updated successfully, but these errors were encountered: