Deep Dive: 2D Arrays

Part of Insertion Sort · Section 4 of 8

Study NotesUnit: 3.1 Fundamentals of AlgorithmsGCSE

This study notes covers Deep Dive: 2D Arrays 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 4 of 8 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.

Deep Dive: 2D Arrays

A 2D array is like a table or grid:

// Noughts and Crosses board
array board[3, 3]

board[0, 0] = "X"
board[1, 1] = "O"
board[2, 2] = "X"

// Visualised:
// [X][ ][ ]
// [ ][O][ ]
// [ ][ ][X]

First index = row, Second index = column

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

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

15 questions on Insertion Sort — practise free

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

Start revising free →