LeetCode
Maximum Average Subarray I
Click
here
for an explanation.