cpp/algorithm/search n

Searches the range for the first sequence of  identical elements, each equal to the given.

@1@ Elements are compared using. @3@ Elements are compared using the given binary predicate. @2,4@ Same as, but executed according to.

Return value
If is positive, returns an iterator to the beginning of the first sequence found in the range. Each iterator in the sequence should satisfy the following condition: @1,2@ is @3,4@  is

If no such sequence is found, is returned.

If is zero or negative,  is returned.

Complexity
Given as : @1,2@ at most comparisons with value using @3,4@ at most applications of the predicate