calculate window sum

(10)  Given a list of integers and a window size, return a new list of
integers where each integer is the sum of all integers in the kth window
of the input list. The kth window of the input list is the integers from
index k to index k + window size – 1 (inclusive).

For example, [4, 2, 73, 11, -5] and window size 2 should return [6, 75,
84, 6]. For another example, [4, 2, 73, 11, -5] and window size 3 should
return [79, 86, 79].