Free interview prep for time and space complexity analysis
Big O Gym is a free practice tool for engineers preparing for technical interviews. Read a code snippet in Python or JavaScript, type your guess for the time and space complexity, and get instant feedback on whether you got it right, almost right (you forgot to simplify), or wrong (and why).
What you'll practice
- Recognizing common complexity classes — O(1), O(log n), O(n), O(n log n), O(n²), O(2ⁿ).
- Multivariable analysis — graph traversals (V + E), matrix problems (m · n), edit-distance (n · m).
- "Looks like A but is B" twists — hidden array shifts, immutable string concatenation, doubling inner loops.
- Amortized analysis — dynamic array push, LRU cache, hashmap operations.
- Per-method complexity for class-shaped problems — LRU, Trie, MedianFinder.
56 problems. Free. No signup.