Merge pull request #2349 from odsantos/fix-arrays-typos

Fix typo.
This commit is contained in:
Ilya Kantor 2020-12-05 18:04:37 +03:00 committed by GitHub
commit e112b8bc16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ alert( getMaxSubSum([1, 2, 3]) ); // 6
alert( getMaxSubSum([100, -9, 2, -3, 5]) ); // 100 alert( getMaxSubSum([100, -9, 2, -3, 5]) ); // 100
``` ```
The solution has a time complexety 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. 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.
For big arrays (1000, 10000 or more items) such algorithms can lead to a serious sluggishness. For big arrays (1000, 10000 or more items) such algorithms can lead to a serious sluggishness.