From 905cf2d1417f856bc730b81d97c3c8ac66cb2a0c Mon Sep 17 00:00:00 2001 From: Julia Date: Mon, 7 Jul 2025 18:32:30 -0300 Subject: [PATCH] Update 01_binary_search.c --- 01_introduction_to_algorithms/c/01_binary_search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_introduction_to_algorithms/c/01_binary_search.c b/01_introduction_to_algorithms/c/01_binary_search.c index 2d727381..96bbde61 100644 --- a/01_introduction_to_algorithms/c/01_binary_search.c +++ b/01_introduction_to_algorithms/c/01_binary_search.c @@ -15,7 +15,7 @@ int main() int binarySearch(int list[], int item, int len) { int low = 0; - int high = len; + int high = len -1; while (low <= high) { int mid = (low + high)/2;