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.
@dolamroth you are right, I had a stupid mistake in my code where I was introducing rounding errors on the division by 2 for very large n. Sorry for that. Now it's fixed and your solution should pass. Can you try submitting it again?
@Voile thanks, it's corrected now.
I added a Python translation, let me know what you think!
I liked this kata so much I made a "Challenge Edition".
It asks you to solve the same problem, but for MUCH larger N. Can you do it without timing out?
https://www.codewars.com/kata/5c1905cc16537c7782000783
It would be more efficient to compare the element before searching the subtree.
This will fail on empty lists. The second case can be omitted if the case for empty lists is added.
This comment is hidden because it contains spoiler information about the solution
Somebody (not me) posted a Scala translation for this one, I think it should be either approved or rejected:
https://www.codewars.com/kumite/5a86a0c1b171010d2a000096?sel=5a86a0c1b171010d2a000096
Scala translation: https://www.codewars.com/kumite/5c03bbcc44f6b6389800022d?sel=5c03bbcc44f6b6389800022d
Not hard to do by hand, just eta conversion and infix <-> prefix notation.
Definitely not a best practice in terms of code clarity though! :D
This comment is hidden because it contains spoiler information about the solution
Of course they are unnecessary, but the kata description explicitly requires the use of regexp.
But if it's ok to disregard the requirement, fine with me :)
Since this is supposed to be 8kyu, how about a hint which regex package to use in Haskell? I tried all I could find by googling, but none seem to be available here.
This does not preserve list order as required by the kata description.
Thanks! Can you tell me how you managed to fix it? Did you not get the error I was getting when I tried to publish the fixed version?
I tried to fix it but I'm not sure if the fixed version is published. I keep getting an error about failed tests even though they all show green.
Loading more items...