Skip to content

Commit 2b6d01b

Browse files
refactor 325
1 parent 427ad19 commit 2b6d01b

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
public class _325 {
77

88
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+
*/
913
public int maxSubArrayLen(int[] nums, int k) {
1014
Map<Integer, Integer> map = new HashMap();
1115
int sum = 0;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy