Question bank › Binary Search Tree
Dsa Binary Search Tree Easy

Wireless Frequency Deadzone

Given a BST of occupied radio frequencies and a target frequency F, find the 'deadzone width'. The deadzone is the gap between the smallest frequency in the tree strictly greater than F and the largest frequency in the tree strictly less than F. If a boundary doesn't exist, use F as that boundary value. Output the absolute difference. Example: Input: 100 50 150 25 75 60 Output: 25 Explanation: Predecessor of 60 is 50. Successor of 60 is 75. Gap: 75 - 50 = 25.

Key concepts

binary_search_treepredecessorsuccessor

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.