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.
Wow, nice one.
How and why does this work?
I was focused on the 'contiguous' sub-array sum and kept trying to go for that with my first solution, but ended up giving up after failing to optimize my code. And I'm honestly disappointed in myself and dumbstruck at how simple this solution is, that I had to try it for myself.
Very nice solution!
I gotta remember to use sets more.
Nice.
I knew it worked out to be that simple, but I wanted to create the triangle as shown and really challenge myself to figure out the pattern and how to recreate it in code. My solution is not as succinct as yours, but I'm still happy with it.
Great job!
Nice one!