Mission 9: "Locating the Master Protocol" 🔍
The Master Protocol has ID `42`. You must find it in the BST-based library.
00:00
Mission Objective
Implement the BST search logic. If the target is less than the current node's value, go left. If it's greater, go right. If it's equal, call `foundProtocol()`.
Step 1 / 1
1. The Story: The Mission Briefing
"The protocol library is a massive BST, ordered by numeric ID. Your old full-traversal search is too slow and would trigger the system's security alarms. You must use the BST property to locate the 'Master Override' protocol before the system locks you out."
2. The Problem
How do you search a sorted hierarchy efficiently?
3. The Task
You will write a search function that starts at the root. At each node, it compares the target ID to the current node's ID and decides whether to go left or right, elegantly navigating directly to the target.
4. Concepts Applied
Implementing a BST search, insertion, and deletion.