cpp/algorithm/stable partition

@1@ Reorders the elements in the range in such a way that all elements for which the predicate  returns  precede the elements for which predicate  returns. Relative order of the elements is preserved.

@2@ Same as, but executed according to.

Return value
Iterator to the first element of the second group

Complexity
Given N = , @1@ Exactly applications of the predicate and  swaps if there is enough extra memory. If memory is insufficient, at most swaps. @2@ swaps and  applications of the predicate