0% found this document useful (0 votes)
9 views3 pages

Algorithm & Data Structure Complexity Reference

The document presents a Big-O complexity chart that categorizes algorithms based on their time complexity, ranging from excellent (O(1)) to horrible (O(2ⁿ)). It includes various algorithms such as Depth First Search, Breadth First Search, Binary Search, and Dijkstra's algorithm, detailing their average and worst-case time complexities and space requirements. Additionally, it provides information on heap data structures and their associated operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Algorithm & Data Structure Complexity Reference

The document presents a Big-O complexity chart that categorizes algorithms based on their time complexity, ranging from excellent (O(1)) to horrible (O(2ⁿ)). It includes various algorithms such as Depth First Search, Breadth First Search, Binary Search, and Dijkstra's algorithm, detailing their average and worst-case time complexities and space requirements. Additionally, it provides information on heap data structures and their associated operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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

You might also like