Solver for N x N sudoku