From 85cb38b38e4edb6350145212116a8f7877c94cbb Mon Sep 17 00:00:00 2001 From: Nikhilesh C S Date: Mon, 28 Oct 2024 13:55:54 +0530 Subject: [PATCH] fix max-subarray-linear-test.js to use right output value in comparision --- .../10-max-subarray-linear/max-subarray-linear-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/05-complexity/10-max-subarray-linear/max-subarray-linear-test.js b/05-complexity/10-max-subarray-linear/max-subarray-linear-test.js index f7eedfb3..29c81ef4 100644 --- a/05-complexity/10-max-subarray-linear/max-subarray-linear-test.js +++ b/05-complexity/10-max-subarray-linear/max-subarray-linear-test.js @@ -7,5 +7,5 @@ test('Finding maximum subarray sum using O(n^2) solution', () => { const arr2 = [-2, -5, -3, -1, -11, -7, -6, -4]; const k2 = 4; - expect(maxSubarraySum(arr2, k2)).toBe(-9); + expect(maxSubarraySum(arr2, k2)).toBe(-11); });