🧮 Algorithms
Cheat sheets for picking the right algorithm for the job.
Complexity Notation
Symbol | Name | Used for |
---|---|---|
Big O notation | Upper Bound, Worst-case | |
Big Omega notation | Lower Bound, Best-case | |
Big Theta notation | Tight 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.