Computer ScienceGeneralQuality 91 · Exceptional

Big-O Notation: Why It Matters

PR
Vanessa NelsonTeacher Tier
@author · 2026-08-21 · v1
7 min read
Big-O describes how an algorithm's runtime grows with input size
nn
, ignoring constants.
O(1)O(1)
is constant;
O(log⁡n)O(\log n)
grows slowly (binary search);
O(n)O(n)
is linear;
O(n2)O(n^2)
is quadratic (nested loops). A
O(n2)O(n^2)
algorithm on 10,000 inputs runs about 100 million steps, while
O(nlog⁡n)O(n\log n)
runs about 130 thousand. Choosing a better complexity class often matters more than micro-optimizing.
0 teacher endorsements

Discussion

Comments support LaTeX — write ∫01x2 dx\int_0^1 x^2\,dx inline with $...$.

Sign in to join the discussion.

No comments yet

Be the first to share your thoughts.