Insertion Sort

Computer ScienceOCRGCSEUnit: 3.1 Fundamentals of Algorithms
Free taster
5 of 6 sections open
The basics

Organising Data

Organising Data

Imagine storing test scores for 30 students. You could create 30 separate variables (score1, score2... score30) - messy! Or use an array - one variable holding all 30 values, accessed by index. Now imagine storing student name, age, and scores together. A record (struct) bundles related data fields together. Arrays are like train carriages (same type, numbered). Records are like forms (different fields, named).

Now try it yourself

Quiz · Question 1 of 15

Which statement best describes how insertion sort works?

Tap an answer to check it

Revise every Computer Science topic, free during alpha

Insertion Sort is one of 60 topics on PrepWise — all aligned to your exam board.

Start revising free →