Skip to main content

🧮 Algorithms

Cheat sheets for picking the right algorithm for the job.

Complexity Notation

SymbolNameUsed for
OOBig O notationUpper Bound, Worst-case
Ω\OmegaBig Omega notationLower Bound, Best-case
Θ\ThetaBig Theta notationTight Bound, represents both an upper and a lower bound
tip

Big O notation is versatile and widely used to describe the upper bound on the time or space complexity of an algorithm, which can apply to the worst-case, average-case, or even best-case scenarios, depending on the context in which it's used.

In this section, we use big O notation to describe the worst-case time complexity of an algorithm unless otherwise specified.

warning

Big theta notation does not represent the average-case, it represents both an upper and a lower bound. To represent the average case, use big O notation with text explaining the average case.