3 ms·
Saying it is bounded by O(n²) is too vague, because it's the same as being bounded by O(n³) and so on. A linear algorithm is also O(n²) and O(n³). That is why
by alco 12y ago
Saying it is bounded by O(n²) is too vague, because it's the same as being bounded by O(n³) and so on. A linear algorithm is also O(n²) and O(n³).
That is why I emphasized that the worst case in particular has its bound within a constant factor of n², hence Ɵ.