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.
I really like this solution, though I have one small nitpick.
You don't really need to reassign
nd = i + k
everytime a newmaxSum
is found, since the starting index of that sum is already being saved.So the final for loop that builds the resulting string would instead look like this:
for(int c = start; c < (start + k); c++)
This comment is hidden because it contains spoiler information about the solution