An item can be searched for in a list using a linear search algorithm. The criteria in which the item has to be searched is set up. The search begins with the first item and checks whether a match is found, then it moves to the second item, and so on. This search continues until a match is found or the end of the list is reached with no match found.
This KS3 Computer Science module introduces linear search to your students, explaining:
- What searching and sorting algorithms are
- How an element is searched for in a list using a linear search algorithm
- Pseudocode for a linear search algorithm
More Alghoritms Modules
Linear search is one lesson in our Algorithms module. The other theory lessons can be found below: