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.
It looks like a usual dynamic programming problem (and so the kata tags say as well), so it's the same as with any case of DP: look what simpler things are used in what way to produce more complex things. (And I've seen enough of this kind of problems for it to be pretty obvious for me.)
Hey, Can you tell me how did you come up with this solution? Or how did you plan the problem to solve it?