All challenges
Code AnalysisIntermediate 60s

Trace: BST Search

Searching for 7 in this BST: root=5, left=3, right=8, 3.left=1, 3.right=4, 8.left=7, 8.right=9. How many comparisons until 7 is found?
Starter code
// BST: 5 -> left 3 -> left 1, right 4
//           -> right 8 -> left 7, right 9
// Search for 7: check 5 (go right), check 8 (go left), check 7 (found!)

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle