Ad
  • Custom User Avatar

    For a new pple, exceptions should be created outside SoulutionTest.class like a regular multiple classes in one file.

  • Custom User Avatar
  • Default User Avatar

    Did you find the solution/answer for this. I have the exact same question.

  • Custom User Avatar

    corrected

  • Default User Avatar

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

  • Custom User Avatar

    No, you're not over thinking it. That was my immediate thought.

    Um, perhaps that only means now two people are overthinking it :-)

    ~

    false means that a hit ball landed out (like it says)

    all you have at your disposal is an array representing all the balls the players have hit and whether they landed in or out...

  • Default User Avatar

    No, you're not over thinking it. That was my immediate thought, which then makes the reconstruction almost impossible. This should be clearly stated in the problem that nobody ever misses. Particularly since the edge case of finishing with a True ball. In essence that edge case IS a miss, it COULD BE an ace...

    Just an oddity of the kata as it is now - poor 'user requirments' gathering maybe

  • Custom User Avatar

    Yes, but what's the probability of having a hand with all 13 cards of spades in the first round? The chances is too small so if we represent that in 2 decimal places then 0.00

  • Custom User Avatar

    done.

  • Default User Avatar

    I believe I have addressed all concerns/issues you raised. Would much appreciate a review. Thanks! EDIT : Missed your last comment. The test cases should accept all valid solutions (so both your examples should be accepted).

  • Default User Avatar

    Thanks for your feedback. I'll review and clarify accordingly. The first point surprises me because my local tests work just fine so I may have boinked something during the transfer to codewars.com. It consistently complains about having "a newer version" so I think there's some state management issue with the editor for me. Either way, will fix.

  • Custom User Avatar

    System.out.println(...);

  • Custom User Avatar

    How do you see the input ?

  • Custom User Avatar

    Thanks for the question.

    Correct. There are no air-swings. i.e.Nobody ever completely misses the ball. So there are no aces (e.g. serve-miss).
    Except, as you said, the only special case is the last ball of the sequence.

    In your example T/T/F is case (1)

    --

    The array elements are meant to represent balls successfully/unsuccessfully hit.
    There was not an intention to say they had to actually land on the ground. Volleys are fine.

    If you think the description is misleading about that please let me know how to improve it.

  • Default User Avatar

    thanks for pointing that out

  • Loading more items...