Skip to content

Commit 265ee62

Browse files
authored
Update binary.cpp
1 parent b57794f commit 265ee62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

binary.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ int binarySearch(int arr[], int l, int r, int x)
1111
// itself
1212
if (arr[mid] == x)
1313
return mid;
14+
1415

1516
// If element is smaller than mid, then
1617
// it can only be present in left subarray
@@ -36,4 +37,4 @@ int main(void)
3637
(result == -1)? cout<< "Element is not present in array\n"
3738
: cout<< "Element is present at index "<< result;
3839
return 0;
39-
}
40+
}

0 commit comments

Comments
 (0)