lets say we have the following pseudo-code:
count = 0
for i in range(0,N):
if a[i] == 0:
count+= 1
Why would you want to go from 0 to N? Let`s say the array has 10 entries. If you were to go from 0 to 10 you would compare 11 numbers to 0. Would it not be correct to change the range to
for i in range(0,N-1):