Skip to content

Commit a10c8f5

Browse files
authored
Update Binary_search.py
1 parent c5f1394 commit a10c8f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Binary_search.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def binary_search(arr, l, r, x):
1212
# If element is smaller than mid, then it can only
1313
# be present in left subarray
1414
elif arr[mid] > x:
15-
return binarySearch(arr, l, mid - 1, x)
15+
return binary_search(arr, l, mid - 1, x)
1616

1717
# Else the element can only be present in right subarray
1818
else:
19-
return binarySearch(arr, mid + 1, r, x)
19+
return binary_search(arr, mid + 1, r, x)
2020

2121
# If we reach here, then the element was not present
2222
return -1

0 commit comments

Comments
 (0)