Brainlag
  1. Python
  2. Problem solving
37/42 lessons

How much work is that?

25 min4 exercisesPremium

Measure how much work Python code does by counting steps with a counter, and see what O(1), O(n), O(n^2) and O(log n) mean in practice.

The skill
Measure how much work your code does and say how it grows as the data grows.
You make
A step counter for searches and pair checks on playlists and usernames.

Premium lesson

£7.99 a month or £59 a year. Cancel any time.

Builds on 36 Final challenge. Free to try: Python Foundations and the playground.

Step 1 of 7
exercise_1.py

You've reached the good stuff.

4 exercises in this lesson, checked as you type. Premium opens every lesson after Foundations, in all four courses.

Python 3.13