Week 13 — Algorithms: Searching, Sorting & Growth
Welcome to your Week 13 Start Here page.
Why this matters
A biology major hunting for one sample ID in a freezer log and a business student sorting a store's sales both need a program that stays fast as the data grows.
In plain language
Two programs can print the same answer while one does far less work than the other, and this week you learn to see the difference. A search (a program that looks through a list for one value) can check every item in turn, or it can keep cutting a sorted list in half. A sort (a program that puts a list in order) can do its work pass by pass, and you can count every check it makes. Counting those checks tells you how a program's work grows (how fast the work rises as the list gets longer), and a short label called Big-O names that pattern. As always, you predict what each program prints and then run it to check.
- Already covered: loops and counters from Weeks 5 and 6, functions from Week 7, lists from Week 9.
- This week: linear and binary search, counting comparisons, selection sort, and Big-O.
- How they connect: each search and sort is a loop over a list with a counter.
- Where we're going next: Week 14, Recursion.
Focus
Two programs get the same answer, so why does one do far less work?
By the end of this module, you should be able to:
- [ ] trace linear and binary search and count their comparisons
- [ ] explain why binary search needs a sorted list
- [ ] trace selection sort and name a growth class
To-do
Plan your week
- Read Chapter 13 (about 55 minutes), then the lecture and slides.
- Work the lecture tutorial (60–90 minutes) and the practice set (about 20 minutes).
- Do the Coding Lab (about 90 minutes), the discussion, and the assignment.
- Take the quiz.
This week's checkpoint: trace a binary search on a sorted list, count its comparisons, and test it on both ends.
You've got this
Predict, then run, and ask your instructor if a step snags.
Built with The Course Maker · samples.thecoursemaker.com