Partial sort

Exercise 4.10

The partial_sort algorithm of the C++ Standard Template Library takes a vector with n elements and a value m, with 1 \leq m \leq n, and re-sorts the vector in such a way that its first m elements are the lowest m elements of the original vector, in increasing order.