1. description

2. Two ways to define

2.1. Prefix Sum without an Extra Initial Zero

prefixsum[i] ==> the sume from nums[0] to nums[i]

sum(l to r) = prefix[r] - prefix[l-1] if l > 0 = prefix[r] if l == 0 <<< annoying

2.2. Prefix Sum without an Extra Initial Zero

prefixsum[i] ==> i represent the length, gives the sum of the first i elements prefixsum[0] = 0 prefixsum[i] = nums[0] + … + nums[i-1]

sum(l to r) = prefix[r+1] - prefix[l]