Linked Questions

22
votes
5answers
1k views

When a constructor calls a helper function, should the helper mutate the object or return part of the object?

I have a private method that is called from the constructor to instantiate a bunch of objects. I can do it two ways. ...
15
votes
5answers
4k 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. ...
9
votes
5answers
4k views

Sudoku verifier in Java

This program verifies if a matrix is a Sudoku or not. These conditions should be verified: There are no duplicates in a row, column, or square The sum of a row, column, or square should be equal to ...
9
votes
2answers
7k views

Sudoku generator in Java

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

Searching all diagonals of a 2D M x M array

I've started writing a piece of code to help me search for an object in all the objects found in the diagonals of an M x M 2D array. Though the code works, I'd like to know if there is a way I can ...
6
votes
1answer
2k 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, ...
6
votes
2answers
2k views

Sudoku with Android

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 ...
11
votes
1answer
534 views

Multithreading class for asynchronous usage of a custom client/server exchange

I've thrown everything I can at this, and I can't get it to lock or crash. My hope is that I have applied the principles correctly. I write client apps in JavaScript, and this is only the 3rd .NET ...
4
votes
2answers
351 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 ...
4
votes
2answers
303 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 ...
2
votes
1answer
373 views

Verification of Sudoku boards

A valid Sudoku board has the following properties The board must be square (n-by-n). Let m = sqrt(n) All rows must contain the numbers 1-n All columns must ...
0
votes
1answer
179 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 ...