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.
Kata is completly solved for C++, i had nothing to do but run the tests and submit.
This comment is hidden because it contains spoiler information about the solution
found some formula on stackoverflow (no credit due to limited space here)
Maximum recursion depth = ((Stack size) - (Total size of stack frames in call chain up to the recursive function)) / (Stack frame size of recursive function)
though it depends on tail recursion optimization. 8 MB stack size as usual, but tunable on OS.
I have readed somewhere around 800 recursions on gcc and 400 in microsoft visual, but you have to check for yourself.
ah, counts uses a hash to find any item and adds to counts.
The syntax looked just confusing to me.
Looks good.
<algorithm>
is needed forstd::count_if
andcctype
fortolower
. It's possible that whose headers are preloaded but I like to explicit about the headers I use.<string>
really isn't needed here. Maybe it's left over a previous attempt of mine.I don't understand what you mean by "i dont like the solution for big strings"
just map is needed as include; i dont like the solution for big strings; otherwise it looks neat
Considering physics every objects that comes up, will fall down.
Though I guess you might study physics and consider a hamilton system or some funky planet? :)
This comment is hidden because it contains spoiler information about the solution
When you hint to not modify the array, it should not be allowed to modify it.
Otherwise this is a boring one.