Have you heard of the QuickSelect algorithm? It's quite good at finding the min/max (I think in practice it's about O(log(n)) average, O(n) worst case).
If you only need a few min/max value, I'd...
Type: Posts; User: helloworld922
Have you heard of the QuickSelect algorithm? It's quite good at finding the min/max (I think in practice it's about O(log(n)) average, O(n) worst case).
If you only need a few min/max value, I'd...