Ad
  • Custom User Avatar

    OP's code is not correct, it contains a trailing newline.

  • Custom User Avatar

    @hobosky, except it's called "Minimax" :)

  • Custom User Avatar

    Anyone still wondering, my solution uses MinMax and with a bit of tweaking it works smoothly, complete test suite runs ~2.5s.

  • Default User Avatar

    Same here, I get the following error:
    (len = 15)

    Expected different result:

    Expected string length 763 but was 882. Strings differ at index 21.

    Expected: "Lorem-----ipsum\ndolor\nsit\namet,\nconsectetur\nadipiscing\nelit.\n..."

    But was:  "Lorem-----ipsum\ndolor-------sit\namet,\nconsectetur\nadipiscing\n..."

    ---------------------------------^

    Edit: Don't blame me for this broken editor. I even inserted br-tags, which aren't ignored in preview...
    Edit2: I see now that this issue has been posted multiple times before.

  • Custom User Avatar
  • Default User Avatar

    These two lines in description contradict themselves:

    • Gap between words can't differ by more than one space.
    • Large gaps go first, then smaller ones: 'Lorem---ipsum---dolor--sit--amet' (3, 3, 2, 2 spaces).
  • Custom User Avatar

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

  • Default User Avatar

    Yesterday I had to go.. Anyway, my bad! I was wrongly assuming that board arrays initialization was supposed to respect board visualization so I got columns and rows swapped. Again sorry for wasting your time.
    That said, maybe it's supposed to be this way as part of the challenge but since the description is so well done in my opinion could be a good thing to point out that first array is first column etc.

  • Default User Avatar

    Hi Steffen, thanks for the Kata!
    I have a question. Is minimax a considered solution? The reason I ask is because I am getting timeout errors. I think one of the tests runs 7000 times which goes longer than 12 seconds.
    Thanks,
    Ronald