Ad
  • Custom User Avatar

    nice challenge and good work converting this to Python. I tried to solve it in Python but tests timed out (error message saying it's over 7 secs). It seems this is because of random test. This random test generates 60 test cases for inputs between 100, 10000 so all are rather high numbers.

    When I run your random test locally it really takes a while to finish. Do we really need this random test? Given limitations on server time perhaps we can stick to hardcoded inputs and outputs?

    Other alternative is limiting random test to small numbers so that it does less computation or limiting the number of random test cases.

  • Custom User Avatar

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

  • Custom User Avatar

    This is great. I didn't know you could pass a radix to the #toString implementation on a Number object. Really appreciate this solution.

  • Custom User Avatar

    Cool kata, but took me a while to figure out what's expected. A couple of suggestions:

    a) It should be clarified that floor start at 1. In Britain and Europe there is ground floor, in US ground floor is simply first floor. I mistakenly assumed that floors will start with zero.

    b) I think that an extra explanation or example could be added to the first paragraph. Something like:

    " .... consecutive way. For example room number 2 is on first floor, room number 7 on second floor etc".

    c) Function signature in Instructions seems redundant, "Your solution" box contains function signature.

    d) In instructions why not change names of clients in sample array from "foo" and "bar" to "Pete" and "John" or something like this?

    e) I would also add some description of sample input output. For Instance
    Input: roomMates(["Peter","MiKE"],0) // should return ['Peter','Mike']
    roomMates(["Pete","Mark","Amanda","Kathy","Ruth","Mary","Frank"],1) // should return ["Frank"]
    roomMates(["Pete","John",,,,,,"Mark],1) // should return "Mark" (empty rooms)

    f) I wonder if this requirement to use filter is really necessary. Perhaps there are people out there who know filter and would like to solve it in different ways? Maybe kata should allow to solve challenge in different ways too?