Which of the following is TRUE about the binary_search() function in C++ STL?
It can search for an element in an unsorted container.
It has a time complexity of O(n).
It always returns an iterator pointing to the found element.
It requires the container to be sorted before searching.
This question is part of this quiz :
C++ STL Non-Mutating Algorithms