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
What if the best sub sequence starts not from index 0 ?
what is the output for int[] arr = {-2,-1,-3,-1};
Expected output : -3
the above logic gives : 0
niu bi
niu bi
That algorithm looks interesting, I also used 2 for loops for doing this kata...
this is genius
Kadane's algorithm
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Well done!
Awesome solution!
Same as my solution, except for this calls to Math.max() functions, which can be dropped.
Compare with my solution.
This comment is hidden because it contains spoiler information about the solution
Loading more items...