Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b6d01b

Browse files
refactor 325
1 parent427ad19 commit2b6d01b

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
publicclass_325 {
77

88
publicstaticclassSolution1 {
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
publicintmaxSubArrayLen(int[]nums,intk) {
1014
Map<Integer,Integer>map =newHashMap();
1115
intsum =0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp