diff --git a/1-js/05-data-types/04-array/10-maximal-subarray/task.md b/1-js/05-data-types/04-array/10-maximal-subarray/task.md index b5ffc4c2..e63c4e62 100644 --- a/1-js/05-data-types/04-array/10-maximal-subarray/task.md +++ b/1-js/05-data-types/04-array/10-maximal-subarray/task.md @@ -8,7 +8,7 @@ The input is an array of numbers, e.g. `arr = [1, -2, 3, 4, -9, 6]`. The task is: find the contiguous subarray of `arr` with the maximal sum of items. -Write the function `getMaxSubSum(arr)` that will find return that sum. +Write the function `getMaxSubSum(arr)` that will return that sum. For instance: @@ -27,4 +27,4 @@ If all items are negative, it means that we take none (the subarray is empty), s getMaxSubSum([-1, -2, -3]) = 0 ``` -Please try to think of a fast solution: [O(n2)](https://en.wikipedia.org/wiki/Big_O_notation) or even O(n) if you can. \ No newline at end of file +Please try to think of a fast solution: [O(n2)](https://en.wikipedia.org/wiki/Big_O_notation) or even O(n) if you can.