Sorting Cards in Your Hand

Part of Insertion Sort Ā· Section 1 of 7

IntroductionUnit: 3.1 Fundamentals of AlgorithmsGCSE

Insertion sort is how most people sort playing cards. You pick up one card at a time and slide it into the right place among the cards you are already holding. The cards in your hand are always in order, and the pile still to pick up shrinks each time.

Insertion sort on the list 5, 3, 8, 1, 9, 2 in six rows. Start: 5 3 8 1 9 2, with 5 as the sorted part. Insert 3: 3 5 8 1 9 2. Insert 8: 3 5 8 1 9 2. Insert 1: 1 3 5 8 9 2. Insert 9: 1 3 5 8 9 2. Insert 2: 1 2 3 5 8 9. Sorted items are green and bold, and the item just inserted has a thick outline.

Insertion sort takes the next item and inserts it into its correct place in the sorted part on the left. The sorted part grows by one item each row. Insertion sort is named in the OCR J277 specification only. AQA and Edexcel name bubble sort and merge sort but not insertion sort.

This introduction covers Sorting Cards in Your Hand within Insertion Sort for GCSE Computer Science. Revise Insertion Sort in 3.1 Fundamentals of Algorithms for GCSE Computer Science with 15 exam-style questions and 10 flashcards. This topic appears regularly enough that it should still be part of a steady revision cycle. It is section 1 of 7 in this topic. Use this introduction to connect the idea to the wider topic before moving on to questions and flashcards.

Practice questions for Insertion Sort

Which statement best describes how insertion sort works?

  • A. It repeatedly swaps adjacent elements until the list is sorted
  • B. It divides the list in half repeatedly and merges sorted halves
  • C. It takes each element and inserts it into its correct position in the already sorted portion
  • D. It selects the smallest element and swaps it to the front each pass
1 markfoundation

Describe how insertion sort works. Your answer should include how the algorithm processes each element.

3 marksstandard

Quick recall flashcards

How does insertion sort work?
Builds sorted list one element at a time by inserting each element into its correct position
What is the time complexity of insertion sort?
O(n²) worst/average case, O(n) best case (already sorted)

15 questions on Insertion Sort: practise free

Instant marking, adaptive difficulty and spaced-repetition flashcards — all aligned to your exam board.

Start revising free →

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.