Depth of a key in a BST
You insert the keys in that order into an initially empty binary search tree (each key walks down from the root, going left if smaller and right if larger, until it hits an empty spot). At what depth does key end up? (The root is at depth .)
Show hints (2)+
- Insert in the given order; each key walks left/right until an empty slot.
- Trace 's path from the root: .
Answer
Reveal answer →Final answer
3
Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.
Asked at: Probability & Market-Making, Game-Based Aptitude