Difference between Big-O and actual execution time

Updated Apr 28, 2026

Short answer

An intermediate dive into Difference between Big-O and actual execution time.

Deep explanation

Algorithms at this level often involve divide-and-conquer strategies or dynamic data structures. For example, O(log n) occurs when the problem size is halved at each step.

Real-world example

Using a phone book to find a name using the middle-split method.

Common mistakes

  • Thinking all loops are O(n)
  • some decrease the input size exponentially.

Follow-up questions

  • Is O(n log n) better than O(n^2)?
  • Does recursion always increase space complexity?

More Big-O Notation interview questions

View all →