• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
April 23, 2024 |210 Views
SDE Sheet - Solve the Sudoku
Description
Discussion

This video is part of the Recursion and Backtracking section under GFG SDE Sheet.

In this problem, we are given an incomplete Sudoku configuration in terms of a 9 x 9  2-D square matrix (grid[][]), the task is to find a solved Sudoku. For simplicity, you may assume that there will be only one unique solution.

A sudoku solution must satisfy all of the following rules:

Each of the digits 1-9 must occur exactly once in each row.
Each of the digits 1-9 must occur exactly once in each column.
Each of the digits 1-9 must occur exactly once in each of the 9 3x3 sub-boxes of the grid.
Zeros in the grid indicates blanks, which are to be filled with some number between 1-9. You can not replace the element in the cell which is not blank.

Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!

Do check out:-
Article: https://www.geeksforgeeks.org/sudoku-backtracking-7/
Problem: https://www.geeksforgeeks.org/problems/solve-the-sudoku-1587115621/1
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More