Hello,

I'm new to algorithm problems and can't understand why my solution would exceed the time limit?

I think that it wouldn't even be O(n) since it only iterates over the list len(nums) / k times?

How am I incorrect in my thinking?

Thanks!

Here's the code:

```
def findMaxAverage(self, nums, k):
sums = []
i = 0
numslen = len(nums)
while i + k <= numslen:
sums.append(sum(nums[i:i+k]))
i += 1
return max(sums) / k
```