Skip to content
This repository was archived by the owner on Apr 21, 2018. It is now read-only.

Commit 1091e21

Browse files
author
YouniS Bensalah
committed
Typo in binarySearch()
1 parent 868a9ee commit 1091e21

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

slides-10.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ \subsection{Binäre Suche}
210210
if (to > from) {
211211
int mid = (from + to) / 2;
212212
if (needle < haystack[mid]) {
213-
return search(needle, haystack, from, mid - 1);
213+
return binarySearch(needle, haystack, from, mid - 1);
214214
} else if (needle > haystack[mid]) {
215-
return search(needle, haystack, mid + 1, to);
215+
return binarySearch(needle, haystack, mid + 1, to);
216216
} else {
217217
return mid;
218218
}

0 commit comments

Comments
 (0)