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.
Yeah, recursion is rarely optimal. But it is fun.
This comment is hidden because it contains spoiler information about the solution
Thanks, I didn't know you could use count() for substrings in Python. :)
Look closely, the expected result is indeed smaller.
In regard to your question, Moagli, it sounds like you removed the "static" keyword from the race method.
The tests call the "race" method from the Tortoise class itself rather than from any instance, so the method needs to remain static.
e.g.
Well done copying my solution verbatim, and just removing the whitespace and braces.
Sure, no problem. Made the generator readable. Let me know if you'd rather I removed it altogether.
Glad to hear you overcame it, and learned something in the process, well done. :)
The console is finicky about consecutive spaces in strings, so these problems can be a real pain to troubleshoot. If you use this workaround to wrap your result:
return "x" + result + "x"
, perhaps you'll see more spaces than intended.As to determining why it's happening, I think adding
System.out.println("[" + s + "]");
to your for loop might shed some light.Good luck.
That issue is already raised lower in the discourse:
Some languages don't test whether 0 is a perfect square. This should get addressed as soon as one can edit +500 solution katas.
Test cases become locked after 500 users have completed the kata.
Yep, I think that should be fine. Mentioning it should help minimize future misunderstandings. :)
I think you're doing Python? Just checked the kata. Tests seem to work, the messages are just a little convoluted. The right-hand value of
'######3700' should equal '#######7##'
is what your solution returned for the input:'3656013700'
.Are you sure? It does when I do it.
I don't see any reason why it should be any different.
outputs
Maybe the problem isn't in the println itself.
System.out.print("hello");
andSystem.out.println("hello");
should work in Java without importing.Loading more items...