Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Cumulative Sum

Goal: Use Python to implement Cumulative Sum

Overview

Write a recursive function which takes an integer and computes the cumulative sum of 0 to that integer.

Ex. if n=4, return 4 + 3 + 2 + 1 + 0 which is 10

Base case in this situation is: n + (n-1) + (n-2) + .... + 0

See Also