Ad
  • Custom User Avatar

    I don't understand. It's obvious when the solution is copy/pasted. Who are they trying to fool?

  • Custom User Avatar

    This should not be considered best practices. There is no reason to build a string of bumps rather than simply count them.

  • Custom User Avatar

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

  • Custom User Avatar

    Link in description is broken.

  • Custom User Avatar

    I changed the A to arr for camelCase in C#. I'm not seeing how the kata can be cheated -- it has all the fixed tests from the JavaScript version, plus a few more edge cases, and random tests as well. I'm ready to fix it, but I'm not sure how.

  • Custom User Avatar

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

  • Default User Avatar

    EDIT: I figured it out -- my static data wasn't getting reset between test runs.

    I'm testing on dotnet 6 locally, and I'm passing the 5x5 test online. When I print the 8x8 at home it looks right, but when I print it in the test online it generates a different pattern. I'm copy/pasting the code to create and print the spiral directly. Anyone have thoughts on what might be happening? I'm not sure what the etiquette is for posting code in the discussions. I'll post in a reply if it's ok.

    On Codewars:    vs  At Home:
    1 1 1 1 1 1 1 1     1 1 1 1 1 1 1 1
    1 0 0 0 0 0 0 0     0 0 0 0 0 0 0 1
    1 0 1 1 1 1 1 1     1 1 1 1 1 1 0 1
    1 0 0 0 0 0 0 1     1 0 0 0 0 1 0 1
    1 0 0 0 0 0 0 1     1 0 1 0 0 1 0 1
    1 0 0 0 0 0 0 1     1 0 1 1 1 1 0 1
    1 0 0 0 0 0 0 1     1 0 0 0 0 0 0 1
    1 1 1 1 1 1 1 1     1 1 1 1 1 1 1 1