**Essential algorithms for GCSE and A Level Computer Science**

**Sorting algorithms**

Routines that organise data in fundamental data structures in order.

**What is a quick sort?**

Perhaps not unsurprisingly given the name of the algorithm, the quicksort orders a data set extremely quickly using **divide and conquer**. The principle of divide and conquer is to create two or more identical, smaller sub-problems from the larger problem, before solving them individually and combining their solutions to solve the bigger problem.

The algorithm makes use a of a pivot value from the data set, against which other items are compared to determine their position. It is often considered more efficient than a merge sort due to requiring less memory than a typical recursive merge sort implementation, but this is not really the case. It is usually dependent on the factors

affecting the algorithm such as the data set being sorted and the pivot chosen.

**What extra is in the book?**

** **

This algorithm / data structure has its own dedicated chapter in the book, which includes:

- Overview
- Typical applications / uses
- Typical operations
- The algorithm written out in simple-structured English
- The algorithm written out in pseudocode
- Full code listing Python
- Full code listing in Visual Basic
- Diagrammatic walk-through
- Efficiency discussion with reference to Big-O notation

A hard copy of the book is available **on our shop** and a free PDF copy is included for all premium subscribers.