Print to P
Big-O Complexity Chart
Excellent Good Fair Bad Horrible
O(1) O(log n) O(n) O(n log n) O(n²) O(2ⁿ)
Elements →
🔄 Array Sorting Algorithms
🏗 Data Structures
🔍 Searching Algorithms
Algorithm Data Structure Time Complexity Space
Average Worst Worst
Depth First Search (DFS) Graph of |V| vertices and |E| edges - O(|E| + |V|) O(|V|)
Breadth First Search (BFS) Graph of |V| vertices and |E| edges - O(|E| + |V|) O(|V|)
Binary Search Sorted array of n elements O(log n) O(log n) O(1)
Linear (Brute Force) Array O(n) O(n) O(1)
Shortest path by Dijkstra (Min-heap) Graph with |V| vertices and |E| edges O((|V| + |E|) log |V|) O((|V| + |E|) log |V|) O(|V|)
Shortest path by Dijkstra (Unsorted array) Graph with |V| vertices and |E| edges O(|V|²) O(|V|²) O(|V|)
Shortest path by Bellman-Ford Graph with |V| vertices and |E| edges O(|V||E|) O(|V||E|) O(|V|)
🏔 Heap Data Structures
Heap Time
Heapif Find Extract Increase Inser Delet Merg
Linked List - O(1 O(1 O(n O(n O(1 O(m+n
Linked List - O(n O(n O(1 O(1 O(1 O(1
Binary O(n O(1 O(log O(log O(log O(log O(m+n
Binomial - O(log