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 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?
Describe how insertion sort works. Your answer should include how the algorithm processes each element.