Maggie HTTN
Case Study • Foundational Algorithms

Selection Sort

A structured learning module for minimum selection, pass-by-pass reasoning, and sorted/unsorted partitioning.

Selection Sort is often introduced early because its structure is simple, but learners still confuse its scan phase with its swap phase or mix it up with insertion and bubble sort. This module makes each pass visible so learners can follow how the minimum value is selected from the unsorted region and moved into its final position.

The lesson focuses on the mental model learners need most: a growing sorted region on the left, a shrinking unsorted region on the right, and one deliberate minimum-selection step per pass.

Project Scope

Curricular Target
Introductory programming, Data Structures, and foundational algorithm courses.
Delivery Model
Hybrid instructional module; adaptable for lecture, guided practice, or self-study.
Learner Profile
Beginners learning comparison-based sorting and moving from intuitive sorting ideas to formal pass-based algorithms.
Primary Objective
Enable learners to explain how each pass selects the minimum value from the unsorted region and places it into the correct sorted position.

Core Learning Outcomes

  • Explain how Selection Sort separates the array into sorted and unsorted regions.
  • Trace the scan–minimum–swap cycle across multiple passes.
  • Identify the minimum value during each pass of the unsorted region.
  • Compare Selection Sort with other beginner sorting methods such as Insertion Sort and Bubble Sort.

Learning Challenge

Learners may understand that Selection Sort “finds the minimum,” but still struggle to track where the scan begins, when the swap should happen, and why the algorithm does not improve much on already sorted input. Another common confusion is treating it like Insertion Sort, where values shift progressively instead of waiting until the full scan is complete.

Design Strategy

Sorted vs. Unsorted Regions Made Visible
Each pass highlights the boundary between the completed left side and the unsorted right side so learners can see where the algorithm is working.
Scan Before Swap
The animation separates searching for the minimum from swapping, helping learners understand that Selection Sort waits until the end of the pass before moving a value.
One Repeated Pattern Per Pass
Every pass follows the same logic—scan, identify minimum, swap—so learners can stabilize the pattern through repetition.
Comparison Through Contrast
The lesson reinforces that Selection Sort is not insertion-by-shifting and not repeated adjacent swapping, which helps reduce confusion with other beginner algorithms.

Core Conceptual Model

Selection Sort maintains two regions: a growing sorted left region and a shrinking unsorted right region. In each pass, the algorithm scans the unsorted region, finds the minimum value, and swaps it into the next sorted position.

Algorithm Process

  1. Set the boundary at the first unsorted position.
  2. Scan the unsorted region to find the minimum value.
  3. Wait until the scan is complete before swapping.
  4. Swap the minimum into the boundary position.
  5. Move the boundary right and repeat.

Performance Characteristics

  • Time Complexity: O(n²) comparisons in best, average, and worst cases.
  • Space Complexity: O(1), in-place.
  • Stability: Not stable by default.
  • Learning Value: Its predictable structure makes it useful for early algorithmic reasoning and comparison-based thinking.

Common Learner Misconceptions

  • Swapping before the scan is complete.
  • Forgetting to reset the minimum index at the start of a new pass.
  • Assuming Selection Sort becomes much faster on nearly sorted input.
  • Confusing it with Insertion Sort’s shifting behavior or Bubble Sort’s repeated adjacent comparisons.

Solution Design

The learning sequence is structured to make each pass of Selection Sort visible as a repeated pattern rather than a hidden loop.

1. Whole Array Before Partition

The lesson begins with the full unsorted array so learners can see that every later pass works by shrinking the unsorted region one step at a time.

2. Scan Phase as a Separate Event

The minimum search is shown before the swap occurs, reinforcing that Selection Sort first decides which value is smallest before moving anything.

3. Minimum Value as the Key Decision

The selected minimum is highlighted so learners can focus on the reason for the swap, not just the visual movement of values.

4. Boundary Movement as Progress Marker

The lesson makes the sorted/unsorted boundary explicit so learners can see what has already been completed and where the next scan begins.

5. Repetition for Pattern Stabilization

Repeated passes are used to show that the same reasoning pattern applies throughout the algorithm, helping learners build transfer to new arrays.


Design Refinement:

Early confusion often centered on whether a swap should happen immediately after finding a smaller value or only after the full scan of the unsorted region is complete.

To address this, the scan phase and swap phase were visually separated, and the minimum marker was kept visible until the swap occurred.

Interactive Implementation

The animation reinforces the scan phase visually before the swap occurs, helping learners see Selection Sort as a repeated minimum-selection process.

Watch actively: pause, predict the minimum value for the current pass, and decide which position will become sorted next.

This implementation shows how each pass scans the unsorted region, identifies the minimum value, and places it into its final sorted position.

Guided Worksheet (Pause & Predict)

These worksheet prompts are designed to support active learning during the animation. Pause the video at each pass, predict what will happen next, then continue to confirm or revise your reasoning.

Part 1 — Reading the Current Pass
  • Which part of the array is already sorted, and which part is still unsorted?
  • Where does the current scan begin?
  • Which position will receive the next minimum value?
Part 2 — Predict the Minimum
  • Which value do you think is the minimum in the current unsorted region?
  • What comparison in the scan helps confirm that choice?
  • Should a swap happen now, or only after the scan finishes?
Part 3 — After the Swap
  • Which value moved into the next sorted position?
  • How did the boundary between sorted and unsorted regions change?
  • What will the next pass need to do?

Focus on the repeated cycle: scan the unsorted region, identify the minimum, then swap once per pass.

Assessment Strategy

This module evaluates understanding through guided prediction, pass-by-pass tracing, and comparison of sorting behavior.

  • Formative assessment (during learning): Students predict the next minimum selection and explain why the swap should wait until the scan is complete.
    • Which value should be selected as the minimum in this pass?
    • Why is that value considered the smallest in the unsorted region?
    • Should the swap happen now or after the full scan? Why?
  • Application assessment (state + process): Students explain how each pass changes the array structure and sorted boundary.
    • What part of the array is sorted after this pass?
    • Which value was moved into its final position?
    • How does the unsorted region change before the next pass begins?
  • Summative assessment (after learning): A short exit check confirms whether students can explain both the logic and the limitations of Selection Sort.
    • How does Selection Sort find the next value to place in the sorted region?
    • Why does the algorithm still use O(n²) comparisons even if the array is already sorted?
    • How is Selection Sort different from Insertion Sort or Bubble Sort?

Assessment Activities

  • Prediction prompts before each minimum-selection pass.
  • Boundary checks showing how the sorted region grows over time.
  • Pass reconstruction after each swap.
  • Comparison questions contrasting Selection Sort with other beginner sorting methods.

Inclusive Design

  • Explicit sorted/unsorted region cues reduce cognitive search during each pass.
  • Separation of scan and swap supports learners who need a slower reasoning tempo.
  • Pacing control supports repeated review of each pass.
  • Guided worksheet prompts support different learning preferences.

Instructional Impact

The module helps learners move from memorizing Selection Sort as a list of commands to understanding it as a repeated minimum-selection process with a clear pass structure, predictable boundary movement, and strong comparison value against other beginner sorting algorithms.