• ###### mcdustelroycommented on "Maximum subarray sum" javascript solution

Thanks for breaking this down. My head was hurting.

• ###### kotik-spbcommented on "Maximum subarray sum" javascript solution

Thanks! Chart really makes this solution much more clear

• ###### dm1981commented on "Maximum subarray sum" javascript solution

This solution took me one entire day plus the night to figure it out. Very very clever!

Sorry!

• ###### willwhitecommented on "Maximum subarray sum" javascript solution

While your point is interesting, it goes without saying. Changes to the task are outside the task's scope.

• ###### Blind4Basicscommented on "Maximum subarray sum" javascript solution

spoiler flag, plz... x/ (all comments are visible through the dashboard)

• ###### willwhitecommented on "Maximum subarray sum" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### willwhitecommented on "Maximum subarray sum" javascript solution

The fact that lightest's question is 3 years old and no-one has answered it may indicate that no-one here actually had such a thought process, i.e. the task was recognised as "known problem x, with known solution y" and the solution was just copied from somewhere, and all the explanations of it are canned (which is why none of them make sense from the perspective of someone who's only familiar with the task description). So, if you're like lightest (or me), don't be too disheartened if you couldn't come up with this solution from scratch from the task description. There may be only one person in the history of the world who's done that, and they may have even started from a clearer task description!

• ###### schoenbcommented on "Maximum subarray sum" javascript solution

That would be a different task.

• ###### ozkedkocommented on "Maximum subarray sum" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### kuchenrollecommented on "Maximum subarray sum" javascript solution

It returns the correct solution, 7.

• ###### Arcodencommented on "Maximum subarray sum" javascript solution

Elegant Solution

• ###### naughtnowwhencommented on "Maximum subarray sum" javascript solution

This great answer wasn't making intuitive sense to me so i used a chart library to help me grock what's going on... it helps me visualize what's going on. Check it out.

https://codepen.io/risingbirdsong/pen/VwYdqZd

Awesome Job!

• ###### omaphilcommented on "Maximum subarray sum" javascript solution

This fails on some use cases, e.g. [-2, 1, 2, -2, -2, 7]