Strictly Ordered Time Complexity Classes

EfficiencyNotationNameGrowth Rate DescriptionMax Input Size (n) for ≈1 Sec
1 (Fastest)ConstantExecution time is completely unaffected by input size.Virtually Infinite
2Double LogarithmicGrows so slowly that it is practically indistinguishable from constant time.Virtually Infinite
3LogarithmicHighly efficient; the problem space is divided (usually halved) at each step.Virtually Infinite ()
4Fractional Power / SublinearGrows slower than linear, commonly seen in algorithms like search blocks.
5LinearScales perfectly 1:1 with the size of the input. (100 million)
6Iterated LinearScaled by the iterated logarithm (which never exceeds 5 for any practical universe-sized input).
7LinearithmicEach input element performs a logarithmic operation (the lower bound for comparison sorting). (10 million)
8QuadraticGrowth scales with the square of the input (standard nested loops). (10,000)
9CubicGrowth scales with the cube of the input (triple nested loops).
10ExponentialThe computation time doubles with every single addition to the input size. to
11FactorialGrows incredibly fast; scales with all permutations of the input.
12 (Slowest)SuperexponentialThe absolute worst scaling; grows faster than factorial.

Common Data Structure Operations

Data StructureAverage AccessAverage SearchAverage InsertionAverage DeletionWorst AccessWorst SearchWorst InsertionWorst DeletionWorst Space
Array
Stack
Queue
Singly-Linked List
Doubly-Linked List
Skip List
Hash TableN/AN/A
Binary Search Tree
Cartesian TreeN/AN/A
B-Tree
Red-Black Tree
Splay TreeN/AN/A
AVL Tree
KD Tree

Array Sorting Algorithms

AlgorithmBest Time ComplexityAverage Time ComplexityWorst Time ComplexityWorst Space Complexity
Quicksort
Mergesort
Timsort
Heapsort
Bubble Sort
Insertion Sort
Selection Sort
Tree Sort
Shell Sort
Bucket Sort
Radix Sort
Counting Sort
Cubesort