Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

maximum of a list in python recursively

def maxi(L): # Recursive Boutros
	if len(L) <= 1:
		return L[0]
	else:
		maximum = maxi(L[1:])
		if maximum > L[0]:
			return maximum
        else:
        	return L[0]
 
PREVIOUS NEXT
Tagged: #maximum #list #python #recursively
ADD COMMENT
Topic
Name
2+7 =