Searching Algorithms

The word search doesn't mean quite the same thing in Computing as it did in ICT. Rather than searching a database, or the world-wide web, you are more likely to consider searching through a list of sorted numbers. It is a technique similar to searching for an answer using the trial and improvement method of solving an equation for GCSE Maths.

The KS3 National Curriculum for Computing says that students need to be aware of different types of algorithms.  This page compares the two most common searching algorithms - the linear search and the binary search - to find the whole number that you are thinking of.



Type of search : Maximum value:


There are examples of linear and binary searches programmed in BASIC and Python. Try changing the program so that it finds a number from 1-1000 - how many guesses does the binary search need then?

There is also a similar page that allows you to compare sorting algorithms.