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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The description is garbage and the starting point for the Ruby code is extremely un-idiomatic. Worst kata I have encountered.
Start by fixing the description. Look at other katas to see what a good description looks like.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This kata slew me. Hot damn.
A more idiomatic version of the same would be to use a
Set
in place of aHash
, as you are not actually doing anything with the values of the hash.You did sidestep the problem with my solution - by using
i1 = i - 1
instead ofi1 = i
, you avoid having to do floating point maths, which I'm pretty sure slows my solution down a fair bit.Enterprise FizzBuzz ain't got nothing on this
A dictionary of codes is provided, no need to reimplement.
The specification is awfully lacking. Nowhere does it mention anything about what sort of data to expect, or what to do with punctuation.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Surely this can't be a correct solution?
This only checks whether
walk
has between 3 and 10 elements.This will incorrectly return
true
for%w(n s s s s e w w w w)
, even though such a route leaves you 3 blocks South and 3 blocks West of where you started.