Skip to content

Instantly share code, notes, and snippets.

View mariusgrigoriu's full-sized avatar

Marius Grigoriu mariusgrigoriu

View GitHub Profile
/*
* Problem 1
*
* Write three functions that compute the sum of the numbers in a given list using a for-loop, a while-loop, and recursion.
*/
/**
* Sum a integer list using `for`.
* @param list array list to sum
* @return the sum.