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.
do you happen to know how I can fully delete the kata?
it says I don't have permissions to delete my own kata.
It's gone now. I'll implement it on a better platform.
It's been awaiting moderator approval for over 6 months. The experience has been a complete waste of time.
I started out with a dictionary-based solution too in Java and C#. But using that as a baseline, with the greatest inputs I could use in the tests, Array-based quadratic solutions were slipping through. It's just the overhead of the data structure relative to an array.
The whole point of this exercise is the challenge of coming up with a linear-time solution, so quadratic solutions need to fail.
That's been resolved.
This comment is hidden because it contains spoiler information about the solution
The longest non-negative sequence is 5 in the example you provided. you think it's 7 because you mistakenly omitted one of the -1 values in the sequence.
As Chrono79 explained, 5 is the correct answer for that input.
Thanks. I removed it.
Typescript has been removed.
which language?
Typescript test cases need work to make them closer to consistency with the other languages. Unfortunately, it isn't possible to use the same process of running multiple volume tests and taking the median as typescript unit tests are limited to a two-second timeout.
I'd prefer to delete typescript, but can't.
Looks like it isn't possible to unpublish a single language, so when I unpublished TS, it unpublished the whole kata. I also can't delete the TS version.
Ok, that's done.
Now all big random tests pass or fail based on the median score, which should make it more consistent. The Java, C# and JS base implementations are as efficient as the Python and Ruby implementations. The non-random big test is now part of the example tests and the TS version has been unpublished.
The timed executions published only consider the execution time of your solution.
The overall timeout includes that in addition to all the other code that goes into setting up the tests.
For random input, the test setup includes running a base solution to see what the answer should be.
So for every instance your solution is run against random input, another base solution is also run and that time is not reported.
Solving this kata requires a very well optimised solution.
Loading more items...