Pearson Edexcel GCSE Computer Science (1CP2)Specification point 1.2.6

Edexcel 1CP2 1.2.6: Standard sorting and searching algorithms

The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

Searching is one of the jobs computers do most: finding a name in a contact list, a word in a document, a marker in a robot's camera log. The simplest search algorithm looks at every item in turn until it finds the one it wants. That is linear search, and this lesson has the robot use it to find a marker in a ring around it.

  • The algorithm
  • Counting the work
  • Searching what the robot sees
  • When linear search is the right choice
Read the free lesson (15 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. F5.5 Linear search Algorithms
    Checking every item: finding a marker in the robot's sightings.
  2. F5.6 Binary search Algorithms
    Halving a sorted list, and why it needs sorted data.
  3. F5.7 Bubble sort Algorithms
    Passes and swaps, stopping early, and hearing a tune become a scale.
  4. F5.8 Insertion sort Algorithms
    Building a sorted part one item at a time, on the robot's readings.

Try it on a robot

The task from F5.5 Linear search, running here. Change the program and press Run.

Past paper questions on this

Real exam questions that test this, each worked through with a program you can run.

The specification is Edexcel's own document; this page says which of our lessons teach point 1.2.6 and is not endorsed by the board.