JavaScript · Algorithm practice lab
Stacks, prefix sums, sweep-line ordering and dynamic programming with edge-case tests.
Prerequisite: JavaScript foundations and loops. · 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
- Dynamic programming with a rolling state
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
- Validate nested brackets with a stack25 min · Browser exercise →
Validate nested brackets with a stack
- Answer range totals with prefix sums25 min · Browser exercise →
Answer range totals with prefix sums
- Count peak overlap with event ordering25 min · Browser exercise →
Count peak overlap with event ordering
- Dynamic programming with a rolling state25 min · Browser exercise →
Dynamic programming with a rolling state