The number of comparisons is logarithmic: at most log(last – first) + 2 . If ForwardIterator is a Random Access Iterator then the number of steps through the range is also logarithmic; otherwise, the number of steps is proportional to last – first. [3] Complexity
Loading...