'Finding the lowest value in a list between 2 indices recursively
I currently have recursive function
def RecursiveMin(L):
if len(L)==2:
if L[0]<L[1]:
return L[0]
else:
return L[1]
else:
X= RecursiveMin(L[1:])
if L[0]<X:
return L[0]
else:
return X
How can I modify this/create a function to where I can limit the search of the minimum value to be be only between 2 indices in a form like RecursiveMin(L, start, end)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
