Technology and Computer Science Computer Science

Sorting by Hand: Selection Sort and Bubble Sort

Students sort a short list of numbers by hand with two sorting algorithms, record every pass in a table, and compare how much work each method does.

Grades 9-1250 minutesSP-CS-012

THE GOAL

What students will learn

Students will carry out selection sort and bubble sort by hand on a five-number list, record the list after each pass, and count comparisons.

BEFORE THE BELL

Get ready

Copy the 2-page worksheet (one per student). Write the three-number bubble sort example from Before Class on the board.

KEEP THE PLAN CLOSE

Your teacher guide

Teacher directions only. Student worksheets and the answer key are in the complete PDF.

SubstitutePlans.com
Technology and Computer Science · Computer Science
SP-CS-012 · Free to print and use in your classroom · substituteplans.com
Page 2
Sorting by Hand: Selection Sort and Bubble
Sort
Technology and Computer Science · Computer Science · Grades 9-12 · 50 minutes
Time needed
50 minutes (one class period)
Prep
Copy the 2-page worksheet (one per student). Write the three-number bubble sort example
from Before Class on the board.
Technology
None.
Student
independence
Medium. Students follow written rules for two sorting methods, then compare tables with a
partner.
Copies to make
One 2-page worksheet per student
Materials
Pencils, Worksheet, Whiteboard or chalkboard, Optional: scrap paper or index cards for
students who like to move numbers around
Goal for today: Students will carry out selection sort and bubble sort by hand on a five-number list, record the list
after each pass, and count comparisons.
Before the bell
☐ Copy the worksheet, one per student (2 pages).
☐ On the board write: 3 1 2. Under it write the bubble sort steps: compare 3 and 1, swap, giving 1 3 2. Compare
3 and 2, swap, giving 1 2 3.
☐ Optional: students may write each number on a scrap of paper to move around their desk.
☐ Keep the answer key on your desk. You do not need to understand the algorithms; the key shows every pass.
Say this to start
Good morning! Sorting is one of the most common jobs a computer does: putting names in order, prices from low to
high, scores from best to worst. Computers follow strict step-by-step rules to do it. Today you will follow two sets of
rules yourself, on paper, and record what happens after each pass. Go slowly and follow the rules exactly. Do not skip
ahead to the answer.

SubstitutePlans.com
Technology and Computer Science · Computer Science
SP-CS-012 · Free to print and use in your classroom · substituteplans.com
Page 3
Run of show
Minutes
What you do
What students do
0–5
Take attendance. Hand out the worksheet face down and
ask students to wait.
Settle in and take out a pencil.
5–12
Show the board example. Say: “In bubble sort, you
compare two neighbors. If the left one is bigger, swap
them. Then move one spot to the right. Here, 3 and 1
swap, then 3 and 2 swap, and the list is sorted.” Have
students read the rule box on the worksheet.
Follow the board example and read the
rules for both sorting methods.
12–25
Tell students to complete the Selection Sort table. Pass 1 is
already done as a model. Walk the room and check that
students find the smallest number in the unsorted part
each pass.
Fill in the list after passes 2, 3 and 4.
25–36
Tell students to complete the Bubble Sort table. Remind
them each pass starts at the left and compares neighbors
until the sorted end.
Fill in the list after passes 1 to 4.
36–44
Tell students to answer questions 1–11 using their tables.
Partners may compare tables first.
Answer questions about passes, swaps and
comparisons.
44–48
Read the answers to the tables and questions 1–7 aloud
from the key. Students mark and correct.
Check and correct their tables.
48–50
Collect all worksheets.
Hand in the worksheet.
If things go wrong
• If students get different answers in the bubble table, have them compare one swap at a time with a neighbor.
The most common slip is skipping a comparison.
• If students ask which sort is better, say that both work, and the questions at the end ask them to compare the
work each one does.
• If a student says the table is already sorted before pass 4, that is fine. Tell them to copy the list down
unchanged for the remaining pass.
• If a student is lost on selection sort, tell them to circle the smallest number in the unsorted part, then swap it
with the number in the first unsorted slot.
Early finishers
• Use either method to sort 5, 1, 4, 2, 8 on the back of the page. Record the list after every pass.
• Write the rules of selection sort in your own words so a younger student could follow them.
• Predict how many comparisons selection sort needs for 6 numbers, then check using the pattern from
question 6.
Support and challenge
• Support: Let students do only the Selection Sort table and questions 1, 2, 6 and 8. They can move scraps of
paper to follow each swap.
• Challenge: Ask students to sort 9, 3, 6, 1, 8, 2 with selection sort and record each pass,

SubstitutePlans.com
Technology and Computer Science · Computer Science
SP-CS-012 · Free to print and use in your classroom · substituteplans.com
Page 4
Notes for the teacher (you fill this in)
Jot a few lines before you leave. A full Daily Sub Report is in the free Sub Survival Kit at SubstitutePlans.com.
How far the class got / what to pick up next:
Students who were especially helpful:
Anything the teacher should know:

READY WHEN YOU ARE

Take the plan with you.

Teacher copy — includes the answer key.

The complete PDF includes welcome pages, substitute directions, student worksheets, and answers. Give students only the worksheet pages. Check the page labels before you print or share.

Download complete teacher PDF

Opens the PDF in a new tab. Use its print controls to select the student pages you need.

Download teacher phone guide

A readable guide that opens offline in your browser. Student worksheets and answers are not included.

Free lesson · SP-CS-006Guide ↓PDF ↓