Computing & AI Class 10
Programming Proper II: Functions, Lists & Simple Algorithms
Search a list two ways, sort it, and count what each one costs.
11 lessons · ~75 min total
Track progress — 0 of 11 lessons read 0%
Lessons in this topic
- 0 Start here A roadmap for two searches, one sort and the counts that compare them. · 4 min You are here
- 1 Is it there at all? A walk checks every fare. It says true when it finds one, and false only after the last. · 7 min
- 2 The counted loop A counted loop keeps a counter. It ends when the test says no. · 7 min
- 3 In order first On a sorted board, check the middle and drop half. Seven fares need at most 3 checks. · 8 min
- 4 Counting both searches Count comparisons for both searches. Doubling the list adds one check to halving. · 7 min
- 5 One pass, and the box in the middle One pass finds the smallest of the rest. Then a swap through a temp box puts it in front. · 7 min
- 6 The whole sort, written down Repeat the pass. Each pass puts one more crate in place. Five crates need four passes. · 8 min
- 7 Sort once, search many Sorting costs comparisons once. With 6 questions on 7 fares, sorting first wins. · 8 min
- 8 How the count grows Double the list. The walk doubles, halving adds one, and selection sort grows about four times. · 7 min
- 9 The big picture One table for two searches, one sort and the counts that compare them. · 4 min
- 10 Track quiz A cheat-sheet table and a quiz with at least one question for each idea. · 8 min
0%
Take this year's practice exam →
Draws questions from every track in this subject's year, not just this one — a Practice result, never official.