#include <iostream>
#include <algorithm>
int main()
{
int array[] = {9, 7, 5, 4, 1, 7, 3, 2, 8, 0};
const int size = sizeof(array)/sizeof(int);
std::sort(array, array+size);
for (int i = 0; i < size; i++)
std::cout << array[i];
return 0;
}
O(n log N) - I think I read that std::sort uses introsort nowadays...
EDIT: did some reading, it looks like just the SGI C++ STL uses introsort, I guess the regular C++ STL still uses quicksort...