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.
is it possible that i could get a step by step breakdown of this, it would really help
Whoops
Code comments should only be visible to solvers, please use spoiler tag, (I just added it).
This comment is hidden because it contains spoiler information about the solution
dont_stop_only_at_leaves
i traced the code, what i observed was that u are ignoring the negtive elements while addinf and assigning it to max found
but according to the description we can't do that
Impressively simple! I hopefully have learned something here!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
spoiler flag...! x/
This comment is hidden because it contains spoiler information about the solution
If the numbers you added previously resulted in a negative number, that means you can ignore them for your subarray. Basically imagine starting after those numbers, since those would just make your subarray sum smaller.
I don't get this either. Has to do with the "if current < 0: current = 0" lines. A nasty shortcut for sure.
increment_factor
is not needed, you can just callfactors[factor]++;
always - if the key does not exist, map will add it with the value0
and increase it to1
as expected.Could you tell me what is happening here? I can't wrap my head around this. Thx in advance.