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's unclear whether strings consisting entirely of spaces are possible input or not. the description does say that the string can be empty, and several languages have a fixed test with an empty string that results in an empty array, which is probably the intended answer for a string consisting entirely of spaces as well.
Nice kata, but it would be great to have a preloaded "events" dictionary that maps snakes and ladders where keys represent the old positions and values the new ones.
This would save time and effort and help prevent mistakes from transfering the values by hand.
Couldn't it be better to show why the tests aren't passing?
like saying the moves played so far so that I track where the problem in code is
my code passed 1000 tests and didn't pass another 1000 ones
This comment is hidden because it contains spoiler information about the solution
Should maybe specify in description whether or not, when a fish is eaten, any "leftovers" from that fish not needed to attain the next level can contribute to getting the next level, or if the whole fish is lost in growing to the next level so that only the next fish can begin contributions to the next level. It appears that the former is true.
two boundary case are problematic:
when the interval is exactly enough to compensate for the alcohol units drank, the expected answer is
false
, which is surprising and should be mentioned in the description; there is even a sample testdrive([[10.0,100]], "20:00", "21:00")
that expects[1.0, false]
, so it does not seem like an oversightyet the reference solutions uses
>
, not>=
, so cases like this show up in the random tests:all languages: typos in the parameter names (vilian -> vilain, vilians -> vilains)
Python:
test
andscoobydoo
should beimport
ed explicitelyshift()
should not be in the preloaded moduleThis comment is hidden because it contains spoiler information about the solution
the paramter
reels
should beconst char *const[]
in C, as the user is not supposed to mutate itNice problem, but it's hard to debug, because printing out the input fulls the buffer because the random tests are so long.
It would help to either display the input on the first failing random test, or add two more cases to the sample tests:
A case where the initial position is not on the top floor.
A case where the initial position is on the bottom floor, but there's more than one floor.
Java:
Missing fixed tests
should be updated to JUnit5 (in the meantime)
Can anyone explain me:How we get for "111111111111111111112222222222" the length of the fish is 5?
I've found it
1111 (2) 2222 (3) 111111111111 (4) 1111222222 (5)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...