teach-ict.com logo

THE education site for computer science and ICT

1. Sorting Algorithms

Putting a data set into some kind of logical order is a very common task. For example, the binary search algorithm discussed in the search section requires an ordered data set to work.

Numbered data sets could be ordered in ascending (lowest to highest) or descending (highest to lowest) order. Text data sets could be ordered in alphabetic order.

There are a number of ways to do this, and they can be described using standardised algorithms. For this syllabus, there are three that you need to understand:

  • Bubble Sort
  • Insertion Sort
  • Merge Sort

Each of these will be described in this section along with their strengths and weaknesses.