Ad
  • Custom User Avatar

    No, because there is more space between 5 and 10 (5) than between 1 and 5 (4). First you maximize the space, then if there is a tie, you chose the closest to the exit.

  • Custom User Avatar

    Since you enjoy sequences, here's a puzzle for you: Can you figure out the next values in this sequence and what they represent? [-1, -1, -1, -1, ...] Bonus question: does the accumulated sum of this sequence diverge towards "negative infinity"?

  • Custom User Avatar

    Hold on a moment. A puzzle provides some clues, but you need to deduce the specifications on your own. Aren't you familiar with this basic concept?

    write code according to specification

  • Custom User Avatar
  • Custom User Avatar

    There's no valid kata issue presented. You don't explain how these "things" are wrong. If you carefully analyze the example, it should make sense. Keep in mind that this is a puzzle kata, so it's not meant to be a straightforward task.

    And watch out with your "demented" language when commenting. This isn't a COD lobby, you know?

  • Custom User Avatar

    exactly, this is a puzzle, and a crucial part of it is hiding expected results

  • Custom User Avatar

    This comment has been reported as abusive

  • Custom User Avatar

    As in "it smells really funky"?
    After realizing the assignment makes no sense as given, I had not zero but "negative infinity" motivation to try to divine what the clown who formulated it meant.

    Unless completelly rewritten, it should be given as a prime example of how not to write a Kata.

    The words before some absurd graph (as in mapping input to output) should actually make sense. It would be better to word it "given such sequence of input/output mappings, divine an algorithm that will pass some BS tests".

  • Custom User Avatar

    Absolutely demented "Kata", the assignment is extremely unclear, the labeling "patients/chairs" on the table is worse than wrong, suggested numbers certainly don't correspond to the insinuated "as far from others as possible, break ties by rounding down".

    Extreme re-wording or nuking this brain-fart are the only options.