laboratory/experiments/go/array-sum/README.md

10 lines
386 B
Markdown
Raw Normal View History

2020-03-20 22:35:25 +00:00
# Array Sum
This package contains functions to return the sum of all elements of a slice.
There are three main functions which all return the same result but uses different methods.
These are:
- `SumWithForLoop` - Uses a for loop to calculate the sum.
- `SumWithRecursion` - Uses recursion to calculate the sum.
- `SumWithTailRecursion` - Uses tail recursion to to calculate the sum.