AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Searching algorithms: Students should know the mechanics of the algorithm.

    This criterion asks you to know the internal mechanics of a searching algorithm, meaning the step-by-step process it follows rather than just its name or purpose.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 2 of 4

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    This criterion asks you to know the internal mechanics of a searching algorithm, meaning the step-by-step process it follows rather than just its name or purpose. For a linear search, the mechanics are: start at the first item, compare it with the target, and if it does not match move to the next item, repeating until the target is found or the list ends. You should be able to state the order of these steps, what is compared at each stage, and the two stopping conditions (found, or no items left). Knowing the mechanics also means recognising what the algorithm does not do, such as skipping items or reordering the data.

    What earns the marks

    • Identifies that a linear search examines items one at a time in sequence from the start of the list.
    • States that each item is compared with the target value before moving on.
    • Recognises the stopping condition of finding a match and returning its position.
    • Recognises the stopping condition of reaching the end of the list without a match.
    • Rejects descriptions that involve jumping, sorting or halving the data as mechanics of a linear search.

    Common mistakes and how to put them right

    • Thinking a linear search must sort the list first.

      Put it right: A linear search works on unsorted data and simply checks each item in turn.

    • Believing a linear search can skip items to save time.

      Put it right: It checks every item in order until found or the list ends.

    • Confusing the mechanics of linear search with binary search by describing halving.

      Put it right: Halving belongs to binary search, which requires sorted data.

    Exam tips

    • Read every option fully and trace it step by step against the real algorithm before deciding.
    • Look for the two stopping conditions in the options, since a correct description must include both.
    • Eliminate options that add steps the algorithm does not perform, such as sorting or reordering.

    Try the lesson

    The start of the Searching algorithms: Students should know the mechanics of the algorithm. lesson, made from checked teaching notes for this specification point.

    Have a go first

    A linear search is used to look for the value 7 in the list [3, 9, 7, 1]. Which value is compared with 7 first?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Searching algorithms: Students should know the mechanics of the algorithm.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge