Compare algorithm performance across different input scenarios!
The same algorithm can have different performance depending on input:
| Algorithm | Best | Average | Worst |
|---|---|---|---|
| Linear Search | O(1) | O(N) | O(N) |
| Binary Search | O(1) | O(log N) | O(log N) |
| Bubble Sort | O(N) | O(N²) | O(N²) |
| Quick Sort | O(N log N) | O(N log N) | O(N²) |