Skip to content
CampusEduX

Sudoku Solver

Hardjavapythonccppjavascript

Given a partially filled 9x9 Sudoku board (empty cells are 0), fill every empty cell so that each row, each column and each 3x3 box contains the digits 1 to 9 exactly once. The puzzle has a unique solution.

Input Format

Nine lines, each containing 9 space-separated integers 0..9 (0 = empty).

Output Format

Print the solved board as 9 lines of 9 space-separated digits.

Related Problems

  • N Queens
    Hard · java, python, c, cpp, javascript
    Solve Problem
  • Factorial Using Recursion
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Fibonacci Number
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...