Skip to content

Commit

Permalink
Merge pull request #5009 from awsame303/master
Browse files Browse the repository at this point in the history
fix error with Maximum Subarray Sum solution
  • Loading branch information
dongliuu authored Dec 27, 2024
2 parents 85e4b61 + ceef727 commit 5f6d77f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions content/3_Silver/More_Prefix_Sums.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public class MaxSubSum {
public static void main(String[] args) throws IOException {
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
read.readLine();
int[] arr = Arrays.stream(read.readLine().split(" ")
.mapToInt(Integer::parseInt).toArray();
int[] arr = Arrays.stream(read.readLine().split(" "))
.mapToInt(Integer::parseInt)
.toArray();

long maxSubSum = arr[0];
long runningPrefSum = 0;
Expand Down

0 comments on commit 5f6d77f

Please sign in to comment.