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
0answers
20 views

Diagonal Sudoku [on hold]

I implemented a diagonal sudoku. Diagonals must not have repetitions My algorithm to check the diagonal was. copy diagonals to arrays left_x and ...
3
votes
2answers
77 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 ...
2
votes
1answer
51 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 ...
5
votes
1answer
95 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
102 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
33 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
199 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
119 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
90 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
62 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
181 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
81 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: ...
9
votes
3answers
256 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
229 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
638 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
400 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
989 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
169 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
56 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
474 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 ...
16
votes
2answers
553 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
385 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
228 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
139 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
493 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 ...
7
votes
2answers
2k views

How good/bad is this Sudoku generator?

I have written this following Sudoku Generator. How good/bad is this? How can I improve this? ...
7
votes
2answers
3k views

Optimizing Sudoku solver in C++

Recently, I wrote a Sudoku solver in C++. My program is very hard and was solved in a few seconds. In my opinion, this is slow. ...
13
votes
7answers
18k views

Logical Sudoku Solver in Java

I've been working on a Sudoku solver as an introduction to the Java programming language. I know there's a bunch of ways to program a Sudoku solver, including a brute force/recursive approach and a ...
7
votes
3answers
4k views

Sudoku Checker in Java

...
11
votes
3answers
1k views

Sudoku Solver: what are good ways to avoid the deepcopy?

In an effort to teach myself some python and programming in general I made a Sudoku Solver (as many others have done before me from what I can tell). The one thing that bugs me a little is my use of ...
2
votes
1answer
238 views

How can I make my sudoku solver C program faster?

I am writing a sudoku solver in C but am having problems with how long it takes to run...it can solve easier puzzles but once I put in one a little more difficult it runs and runs and never stops. ...
7
votes
1answer
258 views

Alternative methods of solving Sudoku

I am learning Java as my first programming language and have written a bit of code. I would love to read expert reviews on this code and suggestions to improve right from naming conventions to logic. ...
13
votes
1answer
1k views

Ruby Sudoku solver

This week's weekend challenge #3 seemed like a great opportunity to learn Ruby! Unfortunately, my workload and looming vacation did not cooperate. :( The puzzle will make forced moves automatically, ...
10
votes
1answer
359 views

Sudoku solver: pencil marks & recursive patience

Here is my attempt at Weekend Challenge #3. Out of scope: It only will do 9*9 It will stop at the first solution Could have been smarter at re-using the cache when recursively calling ...
34
votes
4answers
4k views

SudokuSharp Solver with advanced features

Even though it's the first time I'm writing something this "big", it feels like I know C# quite good. It's been nice to learn LINQ also and I am very impressed by the features, and perhaps I have ...
7
votes
2answers
337 views

Hello Java World ~> Parsing a Sudoku Grid

This is my first, very-very first attempt at java. I haven't started tackling the actual resolution of the sudoku puzzle (not even sure where to start, haven't looked at other weekend-challenge ...
20
votes
2answers
16k views

Sudoku Solver in C

I had this code lying around, so I figured I would submit this as my first attempt at a weekend-challenge. I would prefer if reviews contained suggestions on how to improve the algorithm, but all ...
11
votes
1answer
2k views

Sudoku Week-End Challenge - Brute-Force Recursive solver

This is part of my attempt at the Week-End Challenge #3. The overall problem is larger than will fit in one question. This is a well-contained subset of my larger program. The goal of this part is to ...
16
votes
2answers
737 views

Sudoku using 'exact cover' solver

1. Introduction This is a solution to Weekend Challenge #3: a Sudoku solver in Python. It works by translating a Sudoku puzzle into an exact cover problem, and then solving the exact cover problem ...
12
votes
2answers
2k views

Sudoku solver using simple deductions and brute-force guessing

Here's my attempt at Weekend Challenge #3. Key characteristics of this Python entry are: The strategy is to alternate between "auto-complete" (making simple deductions such as naked singles and ...
2
votes
1answer
1k views

Java: Sudoku solver

I'd like a review on anything including optimizations, corrections, suggestions for robustness, adherence to good coding practices, etc. I also request verification of the complexity: O(nn), where n ...
3
votes
2answers
1k views

Prolog Sudoku solver taking too long

I was wondering if there's any way I can improve this code's execution. I want to use it on a 9*9 grid, but it takes too long to solve this as 4*4. This program takes as input a 4*4 matrix ...
6
votes
1answer
212 views

DSSudokuSolver - A JavaScript Sudoku solving algorithm

I wrote DSSudokuSolver - a sudoku solving algorithm a while back. Is there any possibility that this algorithm can be improved? Original Algorithm: ...
6
votes
2answers
683 views

How can I improve this recursive Sudoku solver?

I've been asked to attach a C++ code sample to my application for an entry-level C++ programmer position in a videogame company. I've created a simple, yet complete console application to solve ...
4
votes
2answers
1k views

Check_sudoku in Python

I have just started to learn programming with Python. I have been going through several online classes for the last month or two. Please bear with me if my questions are noobish. One of the classes I ...
4
votes
2answers
271 views

Sudoku Valid Arangements Permutations Enumerator

I wondered if anyone has any ideas to make this cleaner or more efficient. Mostly this was an exercise to generate the data once (So speed really isn't too important, but I'd love to see what ...
6
votes
1answer
340 views

Change Sudoku code to OOP

I just started learning how to write code in Java. I want to turn the code to OOP with fewer methods, using classes like Sudoku rather than int[][] puzzle. ...
2
votes
2answers
407 views

Is this Sudoku a good use of the Fluent Builder Pattern?

Code Sudoku.java ...
8
votes
1answer
13k views

Solving Sudoku using backtracking

This is a solver for Sudoku using backtracking. How can I make it more optimized and clean? ...
5
votes
1answer
1k views

Python Sudoku GUI

This code implements a data structure for representing a Sudoku board, a very simple algorithm for setting up the board, and a GUI written in tkinter(requires tkinter and tkinter.tix). ...