Recall & Review
beginner
What is the main idea behind the Linear Search Algorithm?
Linear Search checks each item in a list one by one until it finds the target or reaches the end.
Click to reveal answer
beginner
What is the time complexity of Linear Search in the worst case?
The worst-case time complexity is O(n), where n is the number of items in the list.
Click to reveal answer
beginner
Show the basic steps of Linear Search in simple terms.
1. Start at the first item.<br>2. Compare it with the target.<br>3. If it matches, stop and return the position.<br>4. If not, move to the next item.<br>5. Repeat until found or list ends.
Click to reveal answer
beginner
Why is Linear Search not efficient for large lists?
Because it checks every item one by one, it can take a long time if the list is big.
Click to reveal answer
beginner
In which cases is Linear Search useful?
When the list is small or unsorted, or when simplicity is more important than speed.
Click to reveal answer
What does Linear Search do first?
✗ Incorrect
Linear Search starts by checking the first item in the list.
What is the worst-case time complexity of Linear Search?
✗ Incorrect
In the worst case, Linear Search checks all n items, so time complexity is O(n).
When does Linear Search stop?
✗ Incorrect
Linear Search stops when it finds the target or reaches the end of the list.
Which list type is Linear Search best suited for?
✗ Incorrect
Linear Search works well for small or unsorted lists where simplicity matters.
What happens if the target is not in the list?
✗ Incorrect
If the target is not found, Linear Search returns a special value like -1 to show it is missing.
Explain how Linear Search works step-by-step.
Think about checking items one by one.
You got /4 concepts.
Describe when and why you would use Linear Search instead of other search methods.
Consider list size and order.
You got /4 concepts.