Let's test your knowledge. Fill in the missing part by typing it in.
What is the space complexity of the following algorithm?
SNIPPET
1Function: sumElements(arr)
2Returns: Sum of all elements in array
3
4Method:
5n = length of arr
6sum = 0
7
8for i = (1 . . . n)
9{
10 sum += arr[i]
11}
12return sum
Write the missing line below.