Comment on Ask HN: What's the most elegant piece of code you've seen?parentComments−chengiz10yYou are assuming qsort is Quicksort and std::sort is not. Both typically use quicksort; but neither is required to.−StephanTLavavej10yIn C++11, std::sort() is forbidden from being just a quicksort, as it's required to have worst-case O(N log N) complexity.
Comments
You are assuming qsort is Quicksort and std::sort is not. Both typically use quicksort; but neither is required to.
In C++11, std::sort() is forbidden from being just a quicksort, as it's required to have worst-case O(N log N) complexity.