Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    If any of the keys given as an argument is not present in the hash, the method should raise the an exception

    Yes, this is much clearer. Although these might be slightly better:

    If a key given as an argument is not present in the hash, the method should raise an exception

    or

    If any of the keys given in the argument are not present in the hash, the method should raise an exception

    Thanks for the response!

  • Default User Avatar

    This is pretty minor, but the method name in the description doesn't match the method defintion in the default solution window. That is, the kata description should be:

    zeros(12) = 2 # 1 * 2 * 3 .. 12 = 479001600 
    that has 2 trailing zeros 4790016(00)
    

    or the starting solution code should be:

    def solution(n)
      
    end
    

    Other than that (and the typo 'sulution' brought up earlier), nice kata!

  • Default User Avatar

    I'm having some issues with the Ruby submission. For all the comma tests, I get a failed test with the error message being

    Test Failed: Expected: "hello, my dear.", instead got: "hello, my dear."

    or

    Test Failed: Expected: "one, two, three.", instead got: "one, two, three."

    and so on for all the comma test cases. I can't see there being anything wrong with the kata test cases with the number of submissions already accepted. Does anyone have any idea as to why the tests are failing with the strings seemingly identical?

  • Default User Avatar

    Yeah, I talked about it a little in my other comment. It's probably the part of the kata I'm most unsure about, I know it's unneeded, but I thought it would help people to learn what they needed for graph searches if they hadn't done anything like it before. I dunno, what do you think?

  • Default User Avatar

    If hash does not contain at least one of the key given as an argument, method should raise an exception.

    Doesn't this contradict the last test case given? I was expecting to only have to raise an exception if there was no valid keys in the args, not if any single one of the args was an invalid key.

  • Default User Avatar

    Thanks for checking out my kata! It's my first attempt and any feedback would be much welcomed.

    I was initially going to have the method return the path to the station, but I found that it didn't really add a meaningful amount of difficulty to the problem and made the description harder to understand. The 'stations' arg isn't actually required either, but I left it in because I wanted the people who might not have done graph searches to think about what they needed to use to complete the task.

    I'm probably going to follow up this kata with a few more basic graph search based problems, move on into shortest path and then maybe into some max-flow katas. Keep an eye out for them!