
The binary_search Algorithm
STL’s binary_search() algorithm traverses a sequence and returns a Boolean value indicating whether the sought-after element exists in that sequence. binary_search() is declared in the header as follows: bool binary_search (ForwardIterator first, ForwardIterator last, const T& value) binary_search() takes two forward iterators that mark the sequence’s bounds, and the sought-after