Tim and BSTs
CodeChefOpen on judge ↗
Demonetization has affected everyone but Tim. He is still busy with his usual habit of finding some interesting problems over binary trees. Today also he came up with such a problem. Tim is studying **binary search trees**, or **BST**s. In Tim's book, a binary tree with **N** nodes is formalized so that: - Each node is identified by an integer between **1** and **N**, inclusive. - Each node **i*
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start