Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@bad pangolin
The correct result for this test is 18.
Note: it is a subarray of length
1
.theres literally 18 in the array
Hello,
I think this test is wrong :
"
arr = [-7, -11, 0, 16, -20, 18, -8, -8, 15, -7, -20, -5, -18, -7]
Returned solution incorrect for random test with array of size 14: 17 should equal 18
"
I do believe the result is 17, not 18.
Would you mind checking it please ?
While it's not required for the task, you can find the actual subsequence with the same time complexity as finding just the sum.
now on dart too
Translation Dart
Approved
This comment is hidden because it contains spoiler information about the solution
Java:
Node 18 should be enabled (see this fork resolving the issue)
Lua translation !
js fork🤖🤖🤖
mocha/chai
assertionslodash
for randomnessCareful reading is required to solve this kata. When I first tried it I thought we where supposed to find the subsequence and then realized it was the sum. If you write the code trying to find the actual subsequence you will never solve this kata because the code becomes to inefficient.
Enabled in this fork
I use Google translator. I don't know what I'm looking for here. I came here to figure it out lol
This comment is hidden because it contains spoiler information about the solution
Loading more items...