Ad
  • Default User Avatar

    Could you give me a hint what i have to check to find this kind of case ?
    I know i have to check for at least 17 givens and that at least 8 different numbers are used. But other than that im kinda lost^^

  • Default User Avatar
     int[][] p1 = {{9,0,6,0,7,0,4,0,3},
                {0,0,0,4,0,0,2,0,0},
                {0,7,0,0,2,3,0,1,0},
                {5,0,0,0,0,0,1,0,0},
                {0,4,0,2,0,8,0,6,0},
                {0,0,3,0,0,0,0,0,5},
                {0,3,0,7,0,0,0,5,0},
                {0,0,7,0,0,5,0,0,0},
                {4,0,5,0,1,0,7,0,8}};
    
     int[][] p2 = {{3,4,7,9,0,0,0,8,0},
                {0,1,0,8,0,0,0,5,0},
                {0,0,0,0,0,0,0,1,0},
                {0,0,0,5,0,0,0,0,8},
                {0,0,0,4,0,8,0,0,0},
                {6,0,0,0,0,3,0,0,0},
                {0,7,0,0,0,0,0,0,0},
                {0,8,0,0,0,5,0,3,0},
                {0,5,0,0,0,4,2,7,9}};
    

    I found one solution for each of them.

    Why should they throw an IllegalArgumentException??

    There are more than 16 Given Numbers and also 8 different numbers given.

    The Grid size is valid.