[prev] 40 [next]

Exercise 3: Sum of Items

Write functions to sum the values in a list
  • write an iterative version (non-recursive)
  • write a recursive version
Each function has the same prototype:

int sum(List);