Fix binary search bug

This commit is contained in:
Antti H S Laaksonen 2017-05-12 10:43:11 +03:00
parent f4546a632e
commit 111705c44c
1 changed files with 1 additions and 1 deletions

View File

@ -890,7 +890,7 @@ For example, the following code finds out whether
\begin{lstlisting}
auto k = lower_bound(t,t+n,x)-t;
if (k < n) {
if (k < n && t[k] == x) {
// x found at index k
}
\end{lstlisting}