Linear Search
Check every slot in order. On average half the array, in the worst case all of it.
Cost
- Best
- O(1)
- Average
- O(n)
- Worst
- O(n)
- Space
- O(1)
Before this
Leads to
Topics that need this one first.
Taught by the same lesson
Array covers these too, in the same run.