誰でもこのコードが返される理由を教えてくださいRuntimeError: maximum recursion depth exceeded
:
def maximum(tab, indDeb, indFin):
if (indDeb == indFin):
return indDeb
else:
m = (indDeb + indFin) / 2
print "m = ", m
k1 = maximum(tab, indDeb, indFin)
k2 = maximum(tab, m+1, indFin)
if (tab[k1] > tab[k2]):
return k1
else:
return k2
if __name__ == "__main__":
maximum([1, 2, 3, 4, 5], 0, 4)