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

Commit45b4b5b

Browse files
refactor 53
1 parent6567f67 commit45b4b5b

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

‎src/main/java/com/fishercoder/solutions/_53.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ public class _53 {
44

55
publicstaticclassSolution1 {
66
/**
7-
* https://leetcode.com/problems/maximum-subarray/discuss/20211/accepted-on-solution-in-java
7+
* It boils down to:
8+
* whether it's worth to include the current element into the sum or not.
9+
* <p>
10+
* It'll be very straightforward once you draw this array [-2,1,-3,4,-1,2,1,-5,4] out on a paper and walk through it.
811
*/
912
publicintmaxSubArray(int[]nums) {
1013
intglobalMax =nums[0];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp