Ad
  • Custom User Avatar

    It just doesn't work like that... There's no magic here. Maybe the last assertion text is with nil arrays and they don't get displayed in console (IDK how go handles that). I edited your code and it works, you just need to read what error messages tell you and react to them.

    As a little hint: you can replace 6 if statements at top with 2: 1 that deals with nil values and 1 that deals with different array lengths. Good luck.

  • Default User Avatar

    no: {2, 2, 3} => {2x2, 2x2, 3x3} => {4, 4, 9} != {4, 9, 9}

  • Default User Avatar

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

  • Custom User Avatar

    I've tryed return true when the both at the same time are empty - but than it ask return false, and when i return false - it ask to return true

    I dont understand what to do

  • Custom User Avatar

    You could've replied to your original question... Now there's massive wall of text, which no one likes to see :/

    The problem with your code is how you're handling cases when 2 arrays are empty or when 1 array is empty and other one isn't. You should remove most of those if blocks at the top and rewrite them to cover all scenarios, you're almost there. (you can do that in 1 or 2 lines max)

    And by the way, 2 empty arrays should return true.

  • Custom User Avatar

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

  • Custom User Avatar

    That test expects false, both in sample and final tests.

  • Custom User Avatar

    Are you sure those arrays are not manipulated (before logging)? I don't really know Go, but I just solved it and tests seem fine.

  • Custom User Avatar

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

  • Default User Avatar

    Hi @Rodhlann, the kata tests are fine. The issue tag should be reserved for when there is some problem with the kata. You could instead post as a question. The test you are referring to does expect true.

  • Custom User Avatar

    I have a test scenario in Java where it appears that both the a and b arrays are empty when I try to log a[0] or b[0], which is being caught by my check for null/empty, and then failing because the test is expecting the output to be true. Am I missing something here? All other tests are passing.