partial_sort Puts the smallest n elements of a range at the start in sorted order More efficient than sort if you only need a few elements Can be passed a Strict Weak Ordering Function Object There is also partial_sort_copy which only copies the n elements