Mission 1: "Finding the Distress Beacon" 🛰️
00:00
Mission Objective
In the simulation editor, you are given an array of signals. Write a for loop to check every signal. If a signal is equal to 42, use the provided `foundBeacon()` function to report it.
Step 1 / 1
1. The Story: The Mission Briefing
"A Data Crystal containing a stream of unsorted ship signals has arrived. One of them is a distress beacon. Your mission is to find its ID."
2. The Problem
How do you find a specific item in a jumbled array when you don't know its index?
3. The Task
You will write a for
loop to check every single signal in the array, one by one, until you find the beacon.
4. Concepts Applied
Linear Search. After you succeed, the system will grant you an "Efficiency Rating: O(n)", explaining that the time it took was directly proportional to the number of signals (n).