Problem 141. Solve the Sudoku Row
Description
A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The task is, given the row (or column or square) of a Sudoku puzzle with only a single number missing, fill in the missing number and return a completed row.
For more information regarding Sudoku, refer to the Wikipedia Entry for Sudoku.
The input will be in the form of a vector (row or column) or a 9x9 matrix and the output has to have the same dimensionality as the input. Blank entries are signified with the number 0. There will always be one and only one blank entry in the input.
Example
input = [ 1 2 3 4 0 6 7 8 9 ]; output = [ 1 2 3 4 5 6 7 8 9 ];
Solution Stats
Problem Comments
-
5 Comments
3x3 for test
The second test case of matrix is not required..that never happens with sudoku. Only rows and columns should be inputs.
I've always wanted to create an algorithm to solve sudoku
Solution Comments
Show commentsGroup

Paper-&-pencil Games
- 19 Problems
- 4 Finishers
- Guess the number I'm thinking of (Part 1)
- Sudoku square
- Solve the Sudoku Row
- Check to see if a Sudoku Puzzle is Solved
- Sudoku Solver - Standard 9x9
- GJam 2014 China Rd B: Sudoku Checker
- Hangman (easy)
- Hangman (strategy)
- Solve the picross! (Easy)
- Solve the picross! (Hard)
- Skyscrapers - Puzzle
- Word Search Solver
- Fill-a-pix - Solution Checker
- Fill-a-pix - Solver (basic)
- Play Tic-Tac-Toe: Easy Bots
- Play Tic Tac Toe : No Losses Allowed
- Tic Tac Toe Solver
- OXO counting
- Tic-Tac-Logic - Solution Checker
Problem Recent Solvers1024
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!