Big O Practice for Interviews

Read the code, type the complexity, learn what trips you up.

Free Big O practice for time and space complexity analysis

Big O Gym is a free Big O 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).

Modes

  • Practice - infinite random rotation of the 60-problem catalog
  • Daily problem - one curated problem per day, bookmarkable, builds a streak
  • Race sets - timed problem sets you can race against the clock or a friend

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.

Sample problems

  • Two Sum
  • Binary Search Classic
  • Merge Sort
  • Number Of Islands
  • Climbing Stairs
  • Longest Substring No Repeat

60 problems for daily Big O practice. Free. No signup.