Skip to content

Commit 6a3509f

Browse files
authored
Update readme.md
1 parent d29dff1 commit 6a3509f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

solutions/ch_14_Max_Subarray_Sum/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Challenge 13: Find the Maximum Subarray Sum (Kadane's Algorithm)
1+
# Challenge 14: Find the Maximum Subarray Sum (Kadane's Algorithm)
22
Write a function that takes an array as input and returns the Maximum subarray sum. Subarrays are arrays inside another array which only contains contiguous elements. For example, if the array is [-3, -4, 5, -1, 2, -4, 6, -1], the function should return 8 since subarray [5, -1, 2, -4, 6] is the max sum contiguous subarray with sum 8.
33

44
Write a function `MaxSubArraySum` that takes an array as its parameter and returns the maximum subarray sum.
@@ -36,4 +36,4 @@ const arr = [-2, 3, -1, 2];
3636
const max = MaxSubArraySum(arr);
3737
console.log(max); // Output: 4
3838
```
39-
In this example, the `MaxSubArraySum` function correctly returns the Maximum SubArray Sum of the array.
39+
In this example, the `MaxSubArraySum` function correctly returns the Maximum SubArray Sum of the array.

0 commit comments

Comments
 (0)