Educational Cards

Learn from video content, text, and interactive tasks

Filters
Clear
Nested loops imply quadratic explosions

A double loop over indices (i, j) with i, j < n runs Θ(n²) iterations if the inner body is O(1)....

Beginner Asymptotics & empirical timing
Linear scans vs logarithmic hunts

Searching for a value in an unsorted Python list requires a linear scan in the worst case—you might...

Beginner Asymptotics & empirical timing
Space complexity: recursion stack vs buffers

Auxiliary space counts extra memory beyond the input itself: recursion stack frames, temporary...

Intermediate Asymptotics & empirical timing
Checking sorted-order invariants cheaply

Monotonicity checks appear in time-series QA (“is this slice non-decreasing?”), in merge routines...

Beginner Asymptotics & empirical timing
Experiments spanning input sizes

Asymptotic claims are about limits; empirical curves show where limits matter for your hardware and...

Intermediate Asymptotics & empirical timing
Amortisation snapshot: list append

CPython list is a dynamic array : appending usually takes O(1) time, but occasionally triggers a...

Intermediate Asymptotics & empirical timing
Fibonacci pitfalls: branching work

The one-liner fib(n) = fib(n-1) + fib(n-2) is a famous trap: it is correct as mathematics and...

Intermediate Recursion & structural decomposition
Recursion mirrors problem structure

Many real datasets are not rectangular tables yet: responses from REST APIs mix dicts and lists;...

Beginner Recursion & structural decomposition
Base cases anchor recursive solutions

When you ingest nested JSON from a feature store, walk a directory of experiment artefacts, or...

Beginner Recursion & structural decomposition
Recursion depth and the call stack

Every recursive call consumes a stack frame in CPython: local variables, return address, and...

Intermediate Recursion & structural decomposition
Divide-and-conquer search on sorted data

Binary search is the textbook logarithmic pattern: each comparison discards half of the remaining...

Intermediate Recursion & structural decomposition
Debugging recursive programs

Recursive bugs cluster into three buckets: no base case (infinite recursion), wrong combine step...

Beginner Recursion & structural decomposition