Educational Cards
Learn from video content, text, and interactive tasks
Filters
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)....
Linear scans vs logarithmic hunts
Searching for a value in an unsorted Python list requires a linear scan in the worst case—you might...
Space complexity: recursion stack vs buffers
Auxiliary space counts extra memory beyond the input itself: recursion stack frames, temporary...
Checking sorted-order invariants cheaply
Monotonicity checks appear in time-series QA (“is this slice non-decreasing?”), in merge routines...
Experiments spanning input sizes
Asymptotic claims are about limits; empirical curves show where limits matter for your hardware and...
Amortisation snapshot: list append
CPython list is a dynamic array : appending usually takes O(1) time, but occasionally triggers a...
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...
Recursion mirrors problem structure
Many real datasets are not rectangular tables yet: responses from REST APIs mix dicts and lists;...
Base cases anchor recursive solutions
When you ingest nested JSON from a feature store, walk a directory of experiment artefacts, or...
Recursion depth and the call stack
Every recursive call consumes a stack frame in CPython: local variables, return address, and...
Divide-and-conquer search on sorted data
Binary search is the textbook logarithmic pattern: each comparison discards half of the remaining...
Debugging recursive programs
Recursive bugs cluster into three buckets: no base case (infinite recursion), wrong combine step...