inplace_merge
Combines the elements from two consecutive sorted ranges into a single sorted range, where the ordering criterion may be specified by a binary predicate.
template<class BidirectionalIterator> void inplace_merge( BidirectionalIterator _First, BidirectionalIterator _Middle, BidirectionalIterator _Last ); template<class BidirectionalIterator, class Predicate> void inplace_merge( BidirectionalIterator _First, BidirectionalIterator _Middle, BidirectionalIterator _Last, Predicate _Comp );
注,The complexity depends on the available memory as the algorithm allocates memory to a temporary buffer. If sufficient memory is available, the best case is linear with ( _Last – _First) – 1 comparisons; if no auxiliary memory is available, the worst case is Nlog (N), where N = ( _Last – _First).