Ad
  • Custom User Avatar

    Nowadays head and tail also support printing a stack/sensible error messages on failure. But you're right that toCamelCase should support empty string as input.

  • Custom User Avatar

    You are misunderstanding the question.

    The tuple in swaps indicate the position where the swapping takes place. As in

    • The first swap moves the ball from 0 to 1

    • The second swap moves the ball from 1 to 2

    • The final swap doesn't affect the position of the ball. (Because ball is currently at index 2, so the swapping of 0th-indexed and 1st-indexed cup do not affect the ball)

    Note that we are only concerned of the final position of the ball and not the validity of each swapping nor the index / position of invalid swaps.

  • Custom User Avatar

    Can someone help me in this kata description example?
    (start = 0 ; swaps = [(0, 1), (2, 1), (0, 1)] ) --> 2

    Ball from 0 go to 1 then 2,1 is invalid, and 0,1 is also invalid? Then the answer should be 1? I didnt see any move end in 2?

  • Custom User Avatar

    The description warns you:

    Also, make sure your method doesn't return until all three threads have completed. Otherwise the tests may not work even if your solution is correct.

    that's the main issue. when you fix that, that test will work (but another is still failing, there are some out-of-order calls). In any case, that's a problem with your code , not a kata issue

    it works locally

    is never a good argument, especially not with threading and concurrency ;-)

  • Custom User Avatar

    done for Ruby

  • Custom User Avatar

    done

  • Custom User Avatar

    it may be a bit redundant to make the Human class abstract here, since there are no methods or attributes inherrited by man or woman, so theres no common behavior to impliment

  • Custom User Avatar

    for readability and maintainability, it would be bette to split the code,
    store the result of the first collect in a local variable with a meaningful name.
    then on a separate line stream the results and do the needed operations

  • Custom User Avatar

    How can I view the preloaded code or merely it's API?

  • Custom User Avatar

    One of the best Kata challanges I came across here...Real life and practical one...Thank you.

  • Custom User Avatar

    the code you pasted passes the tests as of now, so we cannot replicate the issue

  • Custom User Avatar

    ;-)

  • Custom User Avatar

    done with backwards-compatibility

  • Custom User Avatar

    done for JS

  • Custom User Avatar

    added to JS

  • Loading more items...