I\'m trying to do a lab work from the textbook Zelle Python Programming
The question asked me to \"write and test a recursive function max() to find the
max()
These solutions fail after certain list size.
This is a better version:
def maximum2(a, n): if n == 1: return a[0] x = maximum2(a[n//2:], n - n//2) return x if x > a[0] else a[0] def maximum(a): return maximum2(a, len(a)) maximum(range(99999)) >>> 99998