Skip to content
Marlbridge

AP® Computer Science A · Unit 4 · Topic 4.15

Sorting Algorithms: Checklist (Computer Science A 4.15)

A self-check for selection and insertion sort: describing each step, tracing passes, counting work on sorted and reversed data, writing both sorts and spotting bugs.

Tick each line when you can do it without looking at the guide. Each line names where it is taught and tested. Revisit the study guide for anything you cannot yet do.

Understanding

  • ☐ I can describe selection sort and insertion sort in words (study guide: Selection sort; Insertion sort).
  • ☐ I can state what is guaranteed about the front of the array after k passes of each sort (study guide: Worked example 2; practice: Questions 3, 4 and 8).
  • ☐ I can explain why insertion sort is fast on sorted data and selection sort is not (study guide: Insertion sort; practice: Questions 5 and 6).
  • ☐ I can explain why a swap needs a temporary variable (study guide: Common bugs; practice: Question 7).

Skills

  • ☐ I can trace selection sort pass by pass and write the array after each (study guide: Worked example 1; practice: Questions 1 and 3).
  • ☐ I can trace insertion sort pass by pass and write the array after each (study guide: Worked example 2; practice: Questions 2 and 4).
  • ☐ I can write selection sort for an array (study guide: Selection sort; practice: Question 9).
  • ☐ I can write insertion sort for an array or an ArrayList (study guide: Insertion sort; Sorting an ArrayList; practice: Question 10).

Reasoning

  • ☐ I can count comparisons for selection sort on any input of length n (study guide: Selection sort; practice: Question 5).
  • ☐ I can count shifts for insertion sort on sorted and reversed data (study guide: Insertion sort; practice: Question 6).
  • ☐ I can find the error in a faulty sort (practice: Question 7).
  • ☐ I can explain why the order of the j >= 0 test matters in the while condition (study guide: Insertion sort; practice: Question 10).

Next: Topic 4.16 recursion.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.