Sudoku (数独 sūdoku?, すうどく) English pronunciation: /suːˈdoʊkuː/ soo-doh-koo is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 sub-grids that compose the grid (also called "boxes", "blocks", ...

learn more… | top users | synonyms

3
votes
1answer
76 views

Sudoku solver in JavaScript

I decided to learn JavaScript and what better way than wrestling with a Sudoku solver. I'm guessing there are (many?) optimizations that I missed. I'm thinking of adding a generator also, but this for ...
2
votes
1answer
86 views

Sudoku Android Code

I have been programming for a long time, but nobody has given me any feedback if my code is good or not. Please review it, and give me feedback where I could be better. The source code is also on ...
7
votes
1answer
79 views

Sudoku Solver - uses DFS and Constraint Propagation

Disclaimer: My code is translated from Peter Norvig's Python code. This simple code uses only two techniques: Constraint Satisfaction and Depth-First-Search. Backtracking is not implemented. Here's ...
2
votes
0answers
94 views

Nice GUI for the sudoku solver in Java

I have implemented a GUI for my sudoku solver: You can use mouse for operating it, yet I have coded moving the cell cursor with keys wW/aA/sS/dD. My code ...
4
votes
2answers
71 views

A command line general sudoku solver in Java

I have this command line program that asks the user to (partially) input the source sudoku with some missing values, and after that validates the input and solves it. See what I have: ...
4
votes
1answer
91 views

Recursive backtracking Sudoku solver

I'm trying to learn more algorithmic techniques and I came across an interesting application of recursive backtracking: solving a Sudoku puzzle. I'm looking for a review concerning code style, ...
16
votes
7answers
3k views

Sudoku solution without the use of classes

A Sudoku puzzle is a 9 × 9 grid with some numbers between 1 and 9 in it, that has to be filled in so that every row, every column, and each of the nine 3 × 3 blocks contain ...
1
vote
0answers
43 views

Optimal use of Python 3's multiprocessing package to create Sudoku grids

I want to create Sudoku grids using Python. As it's pretty slow if I want to create a bunch of grids, I decided to use multiprocessing. My computer has 4 virtual ...
4
votes
4answers
162 views

Java solution to check if a Sudoku solution is valid

Here's my solution to checking if a Sudoku board is valid. The algorithm checks the following, Rows add up to 45 Columns add up to 45 Rows have no duplicates Cols have no duplicates Every 3X3 ...
0
votes
1answer
50 views

Check if two numbers are the same in a box

I am making a Sudoku game and I have managed to add random numbers, add numbers, and to checklines (if there is 2 numbers on the same line). I am trying to check the 3x3 boxes if the number is twice ...
4
votes
2answers
119 views

Backtracing Sudoku solver

I have made a backtracking Sudoku solver in Python but it's working quite slow. Originally, It had been working on 4 by 4 grids, which worked fine. But now, trying to solve 9 by 9 grids takes a very ...
7
votes
2answers
239 views

Sudoku Solver in C++ weekend challenge

I am very new to programming (using C++) and coded a sudoku solver as a weekend challenge. I guess there are so many things to criticize, but I would really appreciate some constructive criticism. ...
2
votes
1answer
79 views

Scala code to print a Sudoku board and any possible unsolved values

I'm working through a Sudoku solver problem that I found at UPenn (no it's not my homework ;)). I'm a beginner at Scala, and I'm trying to write good functional code (not that this particular method ...
6
votes
2answers
211 views

Sudoku game with varied difficulty level

I created a Sudoku game with varied difficulty level. The Sudoku board creation process consist three stages: Creation of an empty board Filling the board with numbers Making holes in the filled ...
6
votes
2answers
114 views

Sudoku challenge driver program

For my planned Sudoku with Handicap challenge over at codegolf.SE, I need a driver program. I've decided to write it in Python, for learning purposes. Since I've got no Python experience, I thought I ...
4
votes
1answer
73 views

Sudoku type grid generator

I'm trying to make a program which prints different sized grids (n by n grids). These grids cannot have the same number in any column or row (like a Sudoku). My ...
6
votes
2answers
238 views

Sudoku Puzzle Part 1: Sudoku Class

I was recently given a Sudoku Puzzle to solve, and since I began solving many Sudoku puzzles after, I decided to attempt to create a Sudoku Puzzle viewer with JavaFX. I am not done yet, but have ...
4
votes
2answers
701 views

Sudoku solutions finder using brute force and backtracking

I'm calculating all possible solutions for a given Sudoku board with at least 17 values. My approach is a basic backtracking approach and it works. ...
2
votes
5answers
128 views

Sudoku solver in Ruby

All the test cases pass except one of the test case which runs > 10 seconds. What can I do to make my solution faster? ...
5
votes
1answer
141 views

Sudoku-solving program

This is a Sudoku solver program which uses backtracking. It is a problem from Online Judge and I made it work after some struggle, but it needs to be faster as I'm getting a Time Limit Exceeded ...
4
votes
1answer
106 views

Checking for legal sudoku boards

My problem statement is: Write a function to indicate if a given Sudoku board is legal. This function takes a Sudoku board (which you may assume is a N2xN2 2d list of integers, where N is an ...
6
votes
2answers
952 views

Sudoku Puzzle Solver

I have written a program to solve Sudoku puzzles as a (fun?) way to learn Python. It solves puzzles as a human would, using reasoning algorithms rather than brute force/backtracking, as I thought it ...
1
vote
1answer
125 views

Sudoku verifier program

I implemented a Sudoku validation program. Can this be optimized even further in terms of performance? ...
7
votes
1answer
134 views

Creating Sudoku generator and validator

I've created two classes that contain only sudoku logic. One class Sudoku generates sudoku grid and returns SudokuGrid object ...
5
votes
1answer
252 views

Sudoku game logic

I am trying to create a Sudoku game in F# and I'm having a bit of trouble with the file reading and writing. But since I've also just started programming in f# I would like to check if my thinking is ...
5
votes
2answers
601 views

Sudoku solver using forward checking

I was compelled to look into a Sudoku Solver in Java using the principles I have learned in a course, namely I wanted to make something that included backtracking and forward checking. Has anybody ...
3
votes
1answer
181 views

Recursive Sudoku Solver

I just finished up a program which takes a byte[9][9] as input and recursively does a DFS to find any solutions (including multiple solutions). I'm pretty happy ...
8
votes
1answer
2k views

Sudoku Puzzle Generator

I've written a Sudoku puzzle generator. It currently runs through each line of the 9x9 grid and places numbers randomly if they're valid. It loops over all the numbers from 1-9 and then if it finds ...
5
votes
1answer
144 views

Sudoku app for Ruby

I have written a Sudoku app for Ruby. This is my first attempt at coding in Ruby so there are sure to be lots of way to optimise it or make it more efficient. To summarise the code: it takes an input ...
3
votes
1answer
200 views

Haskell Sudoku solver using bactracking

This solves Sudoku by using backtracking. Accepts one grid where 0 represents a missing number. Here are some examples: http://norvig.com/easy50.txt The program is quite slow. Input is stdin. ...
6
votes
2answers
776 views

Checking validity of NxN Sudoku

Given a multi-dimensional array representing a board in Sudoku, the function should be able to return whether the sudoku is valid or not. Examples: ...
3
votes
3answers
145 views

Multiple for loops in Sudoku solver

I have an assignment for writing a Sudoku solver and have achieved the functionality required but a lot of the code is "ugly" and I'm wanting to simplify it but unsure how to. ...
2
votes
1answer
195 views

Sudoku validator

I've decided to learn some more Haskell writing a Sudoku validator, the function checkSudoku outputs True if the Sudoku is valid and False if it is not. I did not ...
4
votes
1answer
78 views

Ruby Sudoku X-wing solution

I have written a Sudoku solver, for the euler problem and also packaged it into a ruby gem. In my solution strategies I do a lot of iteration (double/triple nested loops, I am coming from Java/C). ...
4
votes
1answer
792 views

Sudoku generator

I managed to create a Sudoku generator but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on ...
1
vote
2answers
117 views

Speeding up Hexadoku

I have serious problem with my Hexadoku (16 x 16 , a - p) solver. I'd like to run the program in under 2 seconds but my solution solves it in 10 seconds. Native Code: ...
10
votes
2answers
455 views

Speed up Sudoku Solver

I made this Sudoku solver using depth first search, it takes less than 0.1 second to solve any simple solution(no guessing), but if the solution requires guessing (thus using the DFS) its time grows ...
3
votes
3answers
292 views

Reading and printing sudoku input

I have seen programs to solve sudoku puzzles but to be honest.. They were badly written. First of all, readability of the program itself was horrible and the code was really long and confusing. So I ...
5
votes
1answer
825 views

Sudoku Solver - Recursive Solve

Any ideas on making my code a bit more clean and efficient? Any criticism is appreciated. I don't like that I'm calling my lengthy DeepCopy method so many times, ...
3
votes
2answers
699 views

4x4 Sudoku solver performance

The code is for a 4x4 Sudoku solver. It works fine when there are a small number of unfilled spaces (0's) but when I give the whole matrix input as 0's or so the solver takes a very long time. I need ...
14
votes
5answers
2k views

Sudoku Solver in Java

This is an assignment posted here. This is my first foray into OO for me. Is this design OK? Or is there something very wrong that I'm not seeing at all. Any suggestions are most welcome and needed. ...
3
votes
2answers
203 views

Generic Sudoku solver might have too many iterations

I'm trying to implement a generic Sudoku solver (with n x n puzzles). The puzzle itself is contained in the class Feld with: ...
1
vote
1answer
62 views

Hints to make Sukoku solver more Pythonic (II)

I tried to implement as many changes suggested as possible as well as expanding the code base according to the suggested link. The original question can be found here. It does solve Sudokus gives ...
5
votes
1answer
595 views

Hints to make Sudoku solver more Pythonic

As you will see, I am not very familiar with Python and NumPy but want to learn it. The following code is a very basic Sudoku solver which works fine for simple examples. Although it runs, I still ...
17
votes
2answers
879 views

Sudoku solver in C++

Some time ago, this question was posed, asking for help in optimizing a Sudoku solver implemented in C++. I decided to reimplement the code using C++11, but without guessing. That is, this Sudoku ...
6
votes
2answers
619 views

Sudoku Solver (easy/medium)

I have written my first real C++ project, a Sudoku solver! It's not elegant, but it works well. It solves easy and medium but not hard! ...
4
votes
2answers
451 views

Making backtracking Sudoku solver more functional

I'm implementing the backtracking solving algorithm for a Sudoku in F#. I'm wondering if I could make my code better respect the functional programming paradigm or even just making it simpler/better. ...
4
votes
2answers
182 views

Create a LINQ Killer Sudoku Cage Solver

When playing Killer Sudoku I find myself repeatedly writing stuff like this: 12/3 921 831 741 732 651 642 543 and then crossing out the combinations that include ...
5
votes
2answers
519 views

A Sudoku game made from Google's Dart language

This is my first real web project and I have never touched JavaScript (barely touched CSS), so I just skipped that and went to dart for fun. Here's a live demo The code for the dart file is down ...
9
votes
2answers
3k views

Sudoku generator in Java

I have written this Sudoku Generator. How good/bad is this? How can I improve this? ...