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 know looping once is more efficient, but I feel like solutions like these break SRP, DRY, and several other principles..
Then again maybe breaking stuff down in functions with high readability are not the point of these kata's...
This comment is hidden because it contains spoiler information about the solution
I've always done string manipulation w/o stringbuilder, and yet I keep seeing solutions more legible than mine that use it. I suppose it's time I read up on stringbuilder, seeing how common it is.
Can be done in linear time.
If you take 100,50 is the priority! 50 can only be found for 100, and 25 should be saved for 50!