• If the size of the source range [sourceBeg,sourceEnd) is not smaller than the size of the destination
range [destBeg,destEnd), all elements are copied and sorted. Thus, the behavior is a
combination of copy() and sort().
• Note that op has to define a strict weak ordering for the values (see Section 7.7, page 314, for
details).
• Complexity: between linear and n-log-n (approximately numElems*log(numSortedElems) comparisons).
The following program demonstrates some examples of partial_sort_copy():