3 ms·
This. I can't comprehend it when people use sort() to find the min/max element instead of a linear scan. And yes, I've seen it happen.
by 10098 14y ago
This.
I can't comprehend it when people use sort() to find the min/max element instead of a linear scan. And yes, I've seen it happen.
- lucian1900 14y agoThat's not a particularly bad example, only O(n) vs O(n logn).