Test cases not run

in what order is to be filled… row wise or col …
plz check logic

@dakshi please save your code on ide.codingblocks.com and share the link

Hi @dakshi i am curious as to why you have declared a globally and then you are passing it in functions as well? While filling the sudoku, it does not matter how you are filling, row-wise of columnwise, as long as the number fulfills all the conditions. the conditions are

  1. all numbers in a row must be unique
  2. all numbers in a column must be unique
  3. all numbers in a 3x3 subgrid must be unique.
    Now, in your output, the solution is wrong because the conditions are not met in some cases.
    In your code, in line 39, i think you meant to call check(a, i, j, n, t) and made a typo.