Big-O Complexity Cheatsheet (Sorting, Structures, Graphs)
A compact table of time and space complexity for common sorting algorithms, searches, data structures and graph algorithms, and a growth table showing how many steps O(n log n), O(n^2) or O(2^n) need for an input size you choose.
Use the tool
Why this tool exists
Complexity tables are easy to half remember: is quicksort worst case n log n or n squared, and does heapsort need extra space? A quick lookup beats guessing in an interview or a design review.
The values are standard textbook figures and were not re-checked against a source for this build. Big-O hides constants, memory access and the shape of your data, so a fast-growing function can still win on small inputs.
How to use it
- Type a word such as sort or graph to filter the table, or leave it empty.
- Set n to see how many steps each growth class needs.
- Compare rows for the structure or algorithm you are choosing.
Frequently asked questions
What does the growth table show?
The raw value of each function at your n. It is not a timing.
Why is n! cut off?
It grows past what a number can hold quickly, so large cases show a text note.
Are these worst-case figures?
Where average and worst differ, both are shown.
Is the table complete?
No. It covers common cases only.