cpp/algorithm/ranges/sample

@1@ Selects elements from the sequence  (without replacement) such that each possible sample has equal probability of appearance, and writes those selected elements into the range beginning at.

@@ The algorithm is stable (preserves the relative order of the selected elements) only if models.

@@ The behavior is undefined if is in.

@2@ Same as, but uses as the source range, as if using  as , and  as.

Return value
An iterator equal to, that is the end of the resulting sample range.

Complexity
Linear: 𝓞.