I\'m trying to code an algorithm that creates a legal Sudoku board in either Java or Javascript. Neither work, and I\'m not entirely sure why.
Essentially, the prob
interesting question, I just noticed this one bug in the Java code: isn't the call to Collection.shuffle() useless since the toCheck array will remain unmodifed (unshuffled) after this call? Here is my quick fix (and I'm sure there are more clever ways to do it):
List lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9);
Collections.shuffle(lst);
for (int i=0; i