Skip to content

Commit 0f2d22c

Browse files
Update solution.md
Fix grammar issues for more clarity
1 parent 53b35c1 commit 0f2d22c

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

Diff for: 1-js/05-data-types/04-array/10-maximal-subarray/solution.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ alert( getMaxSubSum([100, -9, 2, -3, 5]) ); // 100
5959

6060
The solution has a time complexity of [O(n<sup>2</sup>)](https://en.wikipedia.org/wiki/Big_O_notation). In other words, if we increase the array size 2 times, the algorithm will work 4 times longer.
6161

62-
For big arrays (1000, 10000 or more items) such algorithms can lead to a serious sluggishness.
62+
For big arrays (1000, 10000 or more items) such algorithms can lead to serious sluggishness.
6363

6464
# Fast solution
6565

@@ -91,4 +91,4 @@ alert( getMaxSubSum([-1, -2, -3]) ); // 0
9191

9292
The algorithm requires exactly 1 array pass, so the time complexity is O(n).
9393

94-
You can find more detail information about the algorithm here: [Maximum subarray problem](http://en.wikipedia.org/wiki/Maximum_subarray_problem). If it's still not obvious why that works, then please trace the algorithm on the examples above, see how it works, that's better than any words.
94+
You can find more detailed information about the algorithm here: [Maximum subarray problem](http://en.wikipedia.org/wiki/Maximum_subarray_problem). If it's still not obvious why that works, then please trace the algorithm on the examples above, see how it works, that's better than any words.

0 commit comments

Comments
 (0)