Insertion sort

Insertion sort

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

Lesson details

Key learning points

  1. In this lesson, we will explore another sorting algorithm: insertion sort. Some exam boards do not require learners to know insertion sort, so do check the specification first. We will start by discussing how to sort objects in real life, which will help us to describe something akin to an insertion sort.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
"If the item at the current position is greater than the one next to it, swap the items within the list"
False
Correct answer: True
Q2.
"A single pass results in the smallest element reaching its final position at the end of the list"
Correct answer: False
True
Q3.
"The number of comparisons made in a single pass is always equal to the number of pairs you pass over"
False
Correct answer: True

7 Questions

Q1.
"The insertion sort algorithm works by grouping the items in a list into two parts: a sorted sublist and an unsorted sublist."
False
Correct answer: True
Q2.
"With each pass through the list, an item from the unsorted sublist is compared to items in the sorted sublist until it is inserted into the correct position."
False
Correct answer: True
Q3.
"If the item at the current position is greater than value, copy it into the next item and move on to the previous item in the list"
False
Correct answer: True
Q4.
"Insertion sort compares an item from the unsorted sublist with the items in the sorted sublist and places it in the correct position."
False
Correct answer: True
Q5.
"Insertion sort is usually slower to execute than bubble sort on large, unordered data sets."
Correct answer: False
True
Q6.
"Insertion sort is usually slower to execute than bubble sort on large, unordered data sets."
Correct answer: False
True
Q7.
"During a pass of an insertion sort, elements in the sorted part of the list are copied into the next position, to make space for the value to be inserted."
False
Correct answer: True

Lesson appears in

UnitComputing / Algorithms

Computing