Python · Iterators and efficient searches
Generators, heap merging, prefix-frequency counting and binary-search boundaries.
Prerequisite: Python foundations, dictionaries and functions. · 100 minutes of guided study
4 published lessons, from first principles to a small project.
Start first lesson →What you’ll be able to do
- Locate insertion boundaries with bisect
How to study this course
Follow the numbered modules. Read the example, explain why it works, attempt the exercise, then compare your result with the supplied checks.
Setup: A modern browser. JavaScript, TypeScript, Python and SQLite exercises run here; project workshops state their additional setup.
Times estimate guided reading and practice. Projects and revision can take longer.
Course syllabus · 4 lessons
1 · Model, solve and test
- Consume a generator without losing order25 min · Browser exercise →
Consume a generator without losing order
- Merge sorted streams with a heap25 min · Browser exercise →
Merge sorted streams with a heap
- Count target-sum subarrays25 min · Browser exercise →
Count target-sum subarrays
- Locate insertion boundaries with bisect25 min · Browser exercise →
Locate insertion boundaries with bisect