From d3c94f4da3293dd7ada628ca0014638fdc35023a Mon Sep 17 00:00:00 2001 From: awsame303 <72770606+awsame303@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:05:33 -0500 Subject: [PATCH 1/2] fix error with Maximum Subarray Sum solution --- content/3_Silver/More_Prefix_Sums.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/3_Silver/More_Prefix_Sums.mdx b/content/3_Silver/More_Prefix_Sums.mdx index f7aa6f5f3c..c00b418f5d 100644 --- a/content/3_Silver/More_Prefix_Sums.mdx +++ b/content/3_Silver/More_Prefix_Sums.mdx @@ -82,7 +82,7 @@ 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(" ") + int[] arr = Arrays.stream(read.readLine().split(" ")) .mapToInt(Integer::parseInt).toArray(); long maxSubSum = arr[0]; From ceef72716c4f520d963d9ba2a4952e6febc59883 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 16:10:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- content/3_Silver/More_Prefix_Sums.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/3_Silver/More_Prefix_Sums.mdx b/content/3_Silver/More_Prefix_Sums.mdx index c00b418f5d..4996a98b46 100644 --- a/content/3_Silver/More_Prefix_Sums.mdx +++ b/content/3_Silver/More_Prefix_Sums.mdx @@ -83,7 +83,8 @@ public class MaxSubSum { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); read.readLine(); int[] arr = Arrays.stream(read.readLine().split(" ")) - .mapToInt(Integer::parseInt).toArray(); + .mapToInt(Integer::parseInt) + .toArray(); long maxSubSum = arr[0]; long runningPrefSum = 0;