We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 427ad19 commit 2b6d01bCopy full SHA for 2b6d01b
src/main/java/com/fishercoder/solutions/_325.java
@@ -6,6 +6,10 @@
6
public class _325 {
7
8
public static class Solution1 {
9
+ /**
10
+ * 1. This is a beautiful and classic solution that combines prefix sum and hashmap for quick search;
11
+ * 2. This actually covers all possible cases and could find the maximum array size
12
+ */
13
public int maxSubArrayLen(int[] nums, int k) {
14
Map<Integer, Integer> map = new HashMap();
15
int sum = 0;
0 commit comments