We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af01689 commit 07d46a1Copy full SHA for 07d46a1
binary_search_recursive.py
@@ -1,3 +1,8 @@
1
+# Given an array , find if the number exists
2
+# This is a `recursive` implementation of the
3
+# binary search. If the element is not found
4
+# it returns -1
5
+
6
def binarySearch(lst, key, l, r):
7
if r>=l:
8
mid = l + (r-l) // 2
0 commit comments