Skip to content

Commit f07ca04

Browse files
authored
Merge pull request #557 from dagolinuxoid/patch-2
a tiny correction
2 parents 0be650f + 6a71859 commit f07ca04

File tree

1 file changed

+2
-2
lines changed
  • 1-js/05-data-types/04-array/10-maximal-subarray

1 file changed

+2
-2
lines changed

1-js/05-data-types/04-array/10-maximal-subarray/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The input is an array of numbers, e.g. `arr = [1, -2, 3, 4, -9, 6]`.
88

99
The task is: find the contiguous subarray of `arr` with the maximal sum of items.
1010

11-
Write the function `getMaxSubSum(arr)` that will find return that sum.
11+
Write the function `getMaxSubSum(arr)` that will return that sum.
1212

1313
For instance:
1414

@@ -27,4 +27,4 @@ If all items are negative, it means that we take none (the subarray is empty), s
2727
getMaxSubSum([-1, -2, -3]) = 0
2828
```
2929

30-
Please try to think of a fast solution: [O(n<sup>2</sup>)](https://en.wikipedia.org/wiki/Big_O_notation) or even O(n) if you can.
30+
Please try to think of a fast solution: [O(n<sup>2</sup>)](https://en.wikipedia.org/wiki/Big_O_notation) or even O(n) if you can.

0 commit comments

Comments
 (0)