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.
I would say, the main task was incorrectly written. Basically if you go the way how it is done in best clever solution, you just return a max value, but that is not a maximum range, instead it is just brutal mathematics to get maximum value of a range of numbers.
The way it should be written is "Return new array, which represents a range of maximum sum." and tests should be like this:
Test.assertEqualDeep(maxSequence([-2, 1, -3, 4, -1, 2, 1, -5, 4]), [4, -1, 2, 1])
JS.
This comment is hidden because it contains spoiler information about the solution
How does it work? Looks quite buggy... some search for max value but not for a range.
The steps are the same, but with another separator. What will be if additional separating entities will be added as paragraphs, pages?
Brilliantly!