From f660357132b393dea57052ee813ffe74300e9dbf Mon Sep 17 00:00:00 2001 From: Rohan R Bharadwaj <89947037+Rohanrbharadwaj@users.noreply.github.com> Date: Thu, 21 Oct 2021 21:29:00 +0530 Subject: [PATCH] Update Binary_search.py --- Binary_search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Binary_search.py b/Binary_search.py index 7c645f55845..016e78969a2 100644 --- a/Binary_search.py +++ b/Binary_search.py @@ -12,11 +12,11 @@ def binarySearch(arr, l, r, x): # If element is smaller than mid, then it can only # be present in left subarray elif arr[mid] > x: - return binary_search(arr, l, mid - 1, x) + return binarySearch(arr, l, mid - 1, x) # Else the element can only be present in right subarray else: - return binary_search(arr, mid + 1, r, x) + return binarySearch(arr, mid + 1, r, x) # If we reach here, then the element was not present return -1