Ad
  • Custom User Avatar

    You have a bug in your code. Double check for invisible characters.

    There should be no trailing white space at the end of each line, or new line characters at the end of the string.

  • Default User Avatar

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

  • Custom User Avatar

    @joshrainwater that's not an issue as it doesn't affect the test outcome and is just the character not rendering properly on the site. However, to get rid of the confusion I reduced the dimension for that test case so it renders correctly.

  • Custom User Avatar

    I've noticed in my test output, in the sample, there are a couple undefined characters mixed in the sample output somehow on the longer test that makes it fail.

    ■ □ ■ ��� ■ □ ■

    Maybe that's causing issues? Is it a Unicode issue here as well maybe?

  • Custom User Avatar

    Sure, can you post it in a spoiler comment please?

  • Default User Avatar

    Just tested, still not working.
    Expected: □ ■ □ ■
    ■ □ ■ □
    □ ■ □ ■
    ■ □ ■ □, instead got: □ ■ □ ■
    ■ □ ■ □
    □ ■ □ ■
    ■ □ ■ □

    Would you like to see my code?

  • Custom User Avatar

    I have made some improvements to the test feedback. Can you try again?

  • Custom User Avatar

    No problem :).

    There is a bug in your code. I improved the test feedback to give more of an idea why the solution can fail. Try again and hopefully the feedback will be useful!

  • Default User Avatar

    I too have the same problem as MacInnes, my expected and received outputs are the same. I even used split('') to see if there are any whitespaces but none that I can see.

    If checkerboard(4)

    My array to see if there any whitespaces at the end:

    ["□", " ", "■", " ", "□", " ", "■", "\n", "■", " ", "□", …]

    Not sure where to go from here...