00:01
Okay, so for this problem, we are devising an algorithm that will find the sum of all the elements in the list, which are integers.
00:10
So we'll call this procedure sum, and it's going to take then some list, right, from a 1 to a .n of integers.
00:31
So first we want to set our sum equal to zero, right? so we're just sort of initializing it here.
00:41
And then for our index, i, as it runs from 1, which is the first element in the list, to n our last element in the list, it's going to set sum equal to the current sum plus our current element in the list, right? so the first run, when i is equal to 1, sum will be equal to just the first element in the list...