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.
A lot of the Dart solutions do not work with Unicode.
If want to make this trickier, add a test for this ;)
List of lower case unicode chars:
https://www.compart.com/en/unicode/category/Ll
If you do the following in your code, a "BUG...downcast...Float64" with a bunch of "??" will appear:
Instead, you have to break it up like this:
This is only a bug in this version of Crystal. In v0.33, it works fine.
Also, you'll need to cast any division:
(n / 10).to_i
In new versions of crystal, you can do this:
(n // 10)
Well, I got it using
sys.stderr.write
. My solution has one zero in it. I don't know why, so I'll look at fixing my solution.My solution passes all tests but the last one of the multi-solution.
It just says
Incorrect solution: False should equal True
.When I try to do a print or sys.stdout.write to see what the board is, nothing is logged for it, so I assume you are supressing the log for the last solution? But, I get a log for the other solutions.
It's weird that my solution passes all multi-solutions except for the last one. Does the last one check all multi solutions? Or does it just check if valid?
In the instructions:
Shouldn't the result be this?
I think it's confusing.
Interesting solution. I had never used
tr(...)
oreach_cons(...)
before.I think
ch.ord - '0'.ord
is unnecessary. You can just doch.to_i
.If STDOUT error, then you need to remove your System.out.println statements. You're probably printing too much.
For Ruby, no tests or method declaration.
This is partly the fault of the Kata. There should have been random tests as well.
This comment is hidden because it contains spoiler information about the solution
I think this should be 4 kyu. Other 5 kyu's that I have solved were much easier.
According to the problem, having 2+ arrays with same length would be impossible.
So having (a,a) and (b,b) and (c,c) would never occur.
Beautiful O(N) solution.
You should use "s <<" for Best Practices. Faster ;)
I think Best Practices solutions shouldn't use Stack, as recommended by the docs (probably because it extends Vector). Instead, they should use Deque (with ArrayDeque/LinkedList) or ArrayList.
https://docs.oracle.com/javase/8/docs/api/java/util/Stack.html