Skip to content

Commit c56da1a

Browse files
refactor 644
1 parent b5edf8c commit c56da1a

File tree

1 file changed

+0
-19
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-19
lines changed

src/main/java/com/fishercoder/solutions/_644.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 644. Maximum Average Subarray II
5-
* <p>
6-
* Given an array consisting of n integers, find the contiguous subarray whose length is greater than
7-
* or equal to k that has the maximum average value. And you need to output the maximum average value.
8-
* <p>
9-
* Example 1:
10-
* Input: [1,12,-5,-6,50,3], k = 4
11-
* Output: 12.75
12-
* Explanation:
13-
* when length is 5, maximum average value is 10.8,
14-
* when length is 6, maximum average value is 9.16667.
15-
* Thus return 12.75.
16-
* <p>
17-
* Note:
18-
* 1 <= k <= n <= 10,000.
19-
* Elements of the given array will be in range [-10,000, 10,000].
20-
* The answer with the calculation error less than 10-5 will be accepted.
21-
*/
223
public class _644 {
234
/**reference: https://leetcode.com/articles/maximum-average-subarray-ii/#approach-2-using-binary-search-accepted
245
* https://discuss.leetcode.com/topic/96123/java-solution-o-nlogm-binary-search-the-answer/13*/

0 commit comments

Comments
 (0)