Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Restricted Sum by Kurush
def rec_calc(data, index, cur_calc):
if index > len(data) - 1:
return cur_calc
else:
return rec_calc(data, index + 1, cur_calc + data[index])
def checkio(data):
return rec_calc(data, 0, 0)
June 13, 2014
Comments: