From 241923acef481c06d5af0ce0ce952baa6d53384c Mon Sep 17 00:00:00 2001 From: Justsvetoslavov Date: Wed, 24 Nov 2021 18:51:17 +0200 Subject: Refactor --- pract_SI/Pract. 05/Solutions/task6.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pract_SI/Pract. 05/Solutions/task6.cpp') diff --git a/pract_SI/Pract. 05/Solutions/task6.cpp b/pract_SI/Pract. 05/Solutions/task6.cpp index a3804fc..2c8a0e9 100644 --- a/pract_SI/Pract. 05/Solutions/task6.cpp +++ b/pract_SI/Pract. 05/Solutions/task6.cpp @@ -9,7 +9,7 @@ otherwise -1. //int m - middle index //int x - number 'x' we are searching for -int binarySearch1(int *arr, int l, int r, int x) +int binarySearch1(const int *arr, int l, int r, int x) { while (l <= r) { @@ -21,6 +21,5 @@ int binarySearch1(int *arr, int l, int r, int x) else r = m - 1; // If x is smaller, ignore right half } - return -1; // if we reach here, then the element was not present } \ No newline at end of file -- cgit v1.3.1-23-gd82d