Question: # Write a recursive function ` search ` that # takes an ordered array of numbers as a parameter # and a number to search
# Write a recursive function search that
# takes an ordered array of numbers as a parameter
# and a number to search for and returns the index
# of the number in the array using binary, or otherwise. For
# full credit, the search should be implemented using
# recursion, rather than a loop......
# what can we use to determine if the index number you get back is the first one of that type in the list
def binarysearcharray num:
return searcharray num, lenarray
def searcharray num, min, max:
# FIXME
#mid maxmin
if min max:
return
else:
midminmax
if num
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
