Complexity Classes (fastest to slowest)
| Class | Name | Example |
|---|---|---|
| O(1) | Constant | Dict lookup, array index |
| O(log n) | Logarithmic | Binary search |
| O(n) | Linear | Linear scan, single pass |
| O(n log n) | Linearithmic | Merge sort, heap sort |
| O(n²) | Quadratic | Nested loops, bubble sort |
| O(2ⁿ) | Exponential | Brute-force subset enumeration |
| O(n!) | Factorial | Permutation enumeration |
Simplification Rules
O(2n + 5) → O(n) #
[Description truncada. Veja o README completo no GitHub.]