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.
how is this working without sorting the vector first?
oh, I like this one, linear time and O(n) less multiplications/divisions than in my solution
that's a best practice to remember ;)
well mutation was not explicitly prohibited, although you are right, of course, this can produce side effects which would be not so easy to debug
great solution!
can't see it somehow
This comment is hidden because it contains spoiler information about the solution
good one!
this is truly elegant! but would it work for the input ("abcdefghi",3)? The way I see it, the output would be then "abc def ghi " whereas the correct solution should not contain the last space character. Or am I missing something?
probably because it is clearer for beginners (if mostly beginners voted). HashMaps are a little more advanced for a 7kyu problem. I bet there is an even more sophisticated one-liner with streams which (again) would be too much.
thanks, Markus! nice one, as well :) I think I just need more practice with the streams to come to that level
very insightful!
wow
will this work with meta characters like ? / - etc.?
that part with replacing ".0" is very elegant.
Loading more items...