Maximum Average Subarray
Description
Given an array with positive and negative numbers, find themaximum average subarraywhich length should be greater or equal to given lengthk.
Notice
It's guaranteed that the size of the array is greater or equal tok.
Example
Given nums =[1, 12, -5, -6, 50, 3], k =3
Return15.667// (-6 + 50 + 3) / 3 = 15.667
Related problems
Maximum Subarray V
Medium Maximum Subarray IV
Easy Maximum Subarray
Implementation
Link: http://lintcode.com/en/problem/maximum-average-subarray/
N/A