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.
This comment is hidden because it contains spoiler information about the solution
Lua translation!
it's easier than you think.
Hint: Don't try to double loop it.
@Jeki00 god knows xd try to optimize tho
Warning: With enough thinking anyone can come up with a solution without knowing any specific algorithm.
I did O(n^2) and got timed out. what's wrong with mine?
Hello, for C language i think negative numbers test case is wrong. Im supposed to return 0 when there are only negative numbers in the test. Please fix that so i can go next kata.
The wording of the kata is a little off, I'd suggest getting a native English speaker to proofread it
Interesting task. At first it looks very simple, then it looks too complicated. In the end it is solved quite simply, but it makes you think.
8 kyu
Such an amazing kata, I had a solution that worked everywhere but it was extremely slow, took me a long time but I figured out how to make it run much faster
If you're looking for the version where O(n) is expected, it's this kata.
The solution i made is a worst-case-scenario O(n^2), but it uses an optimization.
I removed the optimizations, making it a flat O(n^2). It didn't time out, apparently.
Take a couple elements in a row. Say, from the 2nd to the 4th, [1, -3, 4]. Sum them, and you get 2.
Find the largest such sum, and output it.
Will a simple O(n^2) pass?
Loading more items...