LeetCode
Maximum Average Subarray II
Click
here
for an explanation.