Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Algorithms
Algorithmseasy

What does Big-O describe?

Tags
#big-o#complexity#performance
Back to categoryPractice quiz

Answer

Big-O describes how time or memory grows with input size n (the growth rate). It helps compare algorithms independent of hardware.

Advanced answer

Deep dive

Big-O is an asymptotic upper bound on how a resource (time or space) grows as input size increases.

Key nuances:

  • It ignores constants and lower-order terms to focus on scaling.
  • You should specify the case: worst-case, average-case, amortized.
  • Big-O is an upper bound; Θ is a tight bound; Ω is a lower bound.

Examples

  • O(n log n) sorting scales much better than O(n^2) for large n.
  • Two O(n) algorithms can still differ a lot due to constants and memory access.

Common pitfalls

  • Treating Big-O as exact runtime.
  • Assuming same Big-O means same speed.
  • Ignoring space complexity (often the real bottleneck).

Related questions

Algorithms
Heap sort: what are its time complexity, space complexity, and stability?
#heapsort#sorting#complexity
Algorithms
Quickselect: what is it used for and what is its expected complexity?
#quickselect#selection#partition
Algorithms
Bitmask DP (subset DP): what is it and what is a typical complexity?
#dp#bitmask#subset
Algorithms
What is a monotonic queue and how does it solve sliding window max in O(n)?
#deque#monotonic-queue#sliding-window
Algorithms
Sliding window: what is it and when is it better than nested loops?
#sliding-window#two-pointers#complexity
Algorithms
Counting sort: when can it be faster than O(n log n) sorting?
#counting-sort#sorting#stability