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.
It should have been a 9. If you do the summation, it ends up being 8 short. (=558)
7 kyu seems too low for this kata.
Hahaha, I wrote that comment 3 years ago! I resat the kata and tried again, this time with no hiccups.
Seems to be too hard to be a 7 kyu?
If the resulting array is empty, calling
first
will yieldnil
, which needs to be converted into0
. This can be done either by usingto_i
or|| 0
.Thanks. I have made the last newline mandatory in the Ruby tests.
.
There's a 'С' in the tests. It's not a capital 'C'.
This comment is hidden because it contains spoiler information about the solution
The given test cases assume the "Ja"'s and dots to be combined without spaces, while the actual test cases expect them to be seperated by spaces.
I see my flaw. I need to take into account the position of the element in the original array. That way the sequence between say two
i
in the result becomes the longest.I'm trying to solve this with JavaScript. I think there's an issue with the random tests.
When I get the following input, the expected is what the tests tell me and the "instead got" is my solution. The expected solution expects the second
i
before the seconda
, even the seconda
appears before the secondi
in the input.Even the second
j
should be before the secondi
.I keep getting an error
when calling the
transitionFunction
, which is really annoying. My solution works for the given tests and I cannot see what is wrong with me calling the way I do.Since the two arguments are both booleans we can use them directly when comparing. This solution asks if I'm
employed
and (&&
) not (!
) onvacation
. Since this is Ruby, the last executed line in a method is automatically returned.This was not a 7 kyu in my opinion.
Loading more items...