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.
getting
in the random tests of the sample tests
That would be great - thanks! (You really should get paid for all this.)
Not really, but at this point, I don't want to go back and start modifying the code, particularly because there have been multiple solutions and the Haskell translation.
My concern with this wording is that the reader will be somewhat mystified by why the trees are left=leaning, and I don't think the description is the right place to try to explain that.
Thanks for the time that you have put into this. I think my preference is to remove the "solution must be faster than O(n²)" text from the description.
Concerning "Five random trees of 150,000 nodes", to me the word "random" means not deterministic. Is there alternative wording you would prefer?
I believe I tried this some time ago and found out it complicates things, because of 1's that act as stopping markers or something (not sure, but I didnt exclude 0 for nothing, there was some reason). I think it's already hard enough as it is.
Fixed
fixed
Specified all the listed things
In python you can return/yield only a single object, that can be a tuple of values. (If there is a comma it'a a tuple.)
It uses a macro.
trasnslation indeed
@JohanWiltink,
Thanks for the translation. My original idea was that repeatedly using index should fail, so a dictionary would be needed. After @Blind4Basics bumped up the tree generation, that is the case for the Python version (if I remember correctly). So ideally both your example solutions should fail, and I'm still struggling to understand why they do not. But if you think your non-dictionary solution is appropriate for a 5kyu, I'm OK with it.
Regards,
brodiemark
Thanks Johan, something felt weird when I wrote that. Wasn't thinking in JavaScript mode that day :)
Agree
Removed "clever" code, added normal code.
Loading more items...