From 6a718598f340e42faa0787afc3b5c4b5e54a8a3e Mon Sep 17 00:00:00 2001 From: daGo Date: Wed, 17 Oct 2018 20:14:31 +0300 Subject: [PATCH] a tiny correction I guess 'find return' looks a bit awkward, maybe you wanted to write 'find and return' but dropped 'and'. Just 'return' seems fine. PS. I don't believe that I didn't solve the simple task yet. Few years ago I was able to handle much more complex stuff ... feelsWierdAndBadMan. --- 1-js/05-data-types/04-array/10-maximal-subarray/task.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.