Firefly Halfway Hunt
A moon-firefly is hiding in one numbered tree. Search every tree and dawn will arrive first—so use the forest's halfway secret!
🧠 Before we start
At the Spellbook, you followed dependency links instead of guessing task order. Today, binary search uses another smart rule: in sorted data, test the middle and throw away the half that cannot contain the answer.
Choose a searchable tree row
Binary search needs values in order. Tap the row that rises from smallest to largest.
Follow the halfway clues
The firefly is in tree 27. Tap the glowing middle of the remaining trees. The clue will keep only the possible half.
Lead your own fast hunt
Now find tree 6. Recalculate the middle each time the remaining range gets smaller.
Debug the missing boundary
The target is 24. We tested 20 and learned “higher,” but a buggy rule threw away 24 too. Choose the safe range update.
24 vanished!
🌟 What you learned
- Binary search works when values are sorted.
- Testing the middle splits the remaining search space.
- A higher or lower clue lets the program discard half.
- Repeating that rule finds items with far fewer checks than one-by-one search.
- Range boundaries matter: skipping one valid item creates a search bug.