Ad
  • Default User Avatar

    For sure a nice Kata, but yes the 4 test case is bugged.
    Get the same exception for testing purpose did catch the NullReferenceException, saying values differ at index 0,1.

  • Custom User Avatar

    Please consider completing the code within one function, do not call recursive.

    This is the only reason that I can think of.

  • Default User Avatar

    I've got the same exception on that test case. To get a better understanding of the problem I added the following to the beginning of my solution to simply print the array on screen.

    int XX = array.GetLength(0);
    int YY = array.GetLength(1);          
              
    for (int i = 0; i<XX; i++)
    {
    for (int j = 0; j<YY; j++)
     Console.Write(array[i,j]);           
    } Console.WriteLine("------");
    

    For unknown reasons I pass every test with those lines added, while removing them results in the NullReferenceException.

  • Custom User Avatar

    paste your code here and mark it as having spoiler content.

  • Custom User Avatar

    My code works fine, perhaps your code has some problems ;-)