What is the Big-O Notation Calculator?
Paste a JavaScript snippet to get a rough heuristic estimate of its time complexity based on nested loops.
Paste a JavaScript snippet to get a rough heuristic estimate of its time complexity based on nested loops.
| Algorithm | Time (Average) | Space |
|---|---|---|
| Hash Table Lookup | O(1) | O(N) |
| Binary Search | O(log N) | O(1) |
| Linear Search | O(N) | O(1) |
| Merge Sort | O(N log N) | O(N) |
| Quick Sort | O(N log N) | O(log N) |
| Bubble / Insertion Sort | O(N^2) | O(1) |
Paste a JavaScript snippet to get a rough heuristic estimate of its time complexity based on nested loops.