Skip to content

Commit ef43bf9

Browse files
authored
Update linear_search_recursion.py
1 parent 27395b6 commit ef43bf9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Arrays-searching/src/linear_search_recursion.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Recursive function to search x in arr[l..r]
1+
# Recursive function to search x in arr[l..r]
2+
# Another python program to search an element linearly in an array using Recursion (Read again 💯 )
3+
#Why recursion? Because it makes the task easier and reduces time complexity.
24
def rec_search( arr, l, r, x):
35
if r < l:
46
return -1

0 commit comments

Comments
 (0)