From fc1200ae2cd63017c44e1c94281babd3c01a0eeb Mon Sep 17 00:00:00 2001
From: Joseph Mawa <52580190+nibble0101@users.noreply.github.com>
Date: Wed, 19 Aug 2020 18:04:47 +0300
Subject: [PATCH] Update greatest-subsequential-sum.english.md (#39422)
Added missing closing bracket in test description in the tests section.
Removed variable declared twice in the solution section.
---
.../rosetta-code/greatest-subsequential-sum.english.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/greatest-subsequential-sum.english.md b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/greatest-subsequential-sum.english.md
index 7e1ce76feb..3aef224e52 100644
--- a/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/greatest-subsequential-sum.english.md
+++ b/curriculum/challenges/english/10-coding-interview-prep/rosetta-code/greatest-subsequential-sum.english.md
@@ -32,7 +32,7 @@ tests:
testString: assert.deepEqual(maximumSubsequence([0, 8, 10, -2, -4, -1, -5, -3]), [ 0, 8, 10 ]);
- text: maximumSubsequence([ 9, 9, -10, 1 ])
should return [ 9, 9 ]
.
testString: assert.deepEqual(maximumSubsequence([ 9, 9, -10, 1 ]), [ 9, 9 ]);
- - text: maximumSubsequence([ 7, 1, -5, -3, -8, 1 ]
should return [ 7, 1 ]
.
+ - text: maximumSubsequence([ 7, 1, -5, -3, -8, 1 ])
should return [ 7, 1 ]
.
testString: assert.deepEqual(maximumSubsequence([ 7, 1, -5, -3, -8, 1 ]), [ 7, 1 ]);
- text: maximumSubsequence([ -3, 6, -1, 4, -4, -6 ])
should return [ 6, -1, 4 ]
.
testString: assert.deepEqual(maximumSubsequence([ -3, 6, -1, 4, -4, -6 ]), [ 6, -1, 4 ]);
@@ -73,7 +73,6 @@ function maximumSubsequence(population) {
}
var greatest;
var maxValue = 0;
- var subsequence = [];
for (var i = 0, len = population.length; i < len; i++) {
for (var j = i; j <= len; j++) {