Sudoku Solver - Hard Problem

Build a Sudoku solver using Recursion and Backtracking.

Problem statement

Given a partially filled (9 × 9) 2-D array grid[9][9], the goal is to assign digits (from 1 to 9) to the empty cells so that every row, column, and subgrid of size 3×3 contains exactly one instance of the digits from 1 to 9.

Let’s look at an example to understand the input and output format.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.