Heap vs Binary Search Tree (BST)
What is the difference between a heap and BST? When to use a heap and when to use a BST? If you want … Read more
What is the difference between a heap and BST? When to use a heap and when to use a BST? If you want … Read more
Why is std::map implemented as a red-black tree? There are several balanced binary search trees (BSTs) out there. What were design trade-offs in … Read more
Can anyone please explain the difference between binary tree and binary search tree with an example? 12 Answers 12
Sure – you simply can’t apply the > operator between objects. What would you expect it to do? You can’t apply any of the other … Read more
Your function does not have a return for every possible circumstance. You have: if (null)… if (less than root)… else ( if …) … Read more