Defined in header <algorithm> template< class ForwardIt >
ForwardIt adjacent_find( ForwardIt first, ForwardIt last ); (1) template< class ForwardIt, class BinaryPredicate>
ForwardIt adjacent_find( ForwardIt first, ForwardIt last, BinaryPredicate p ); (2)
Searches the range [first, last) for two consecutive identical elements. The first version uses operator== to compare the elements, the second version uses the given binary predicate p.
Parameters
firs