Anonymous user
Sudoku: Difference between revisions
→{{header|Ruby}}
Line 615:
def permissible(matrix, i, j)
ok = [
# Same as another in the column isn't permissible...
(0..8).each { |i2|
Line 636:
}
# Convert to the array format...
▲ (0..8).each { |i2| ret.push(i2 + 1) if ok[i2] }
end
def deep_copy_sudoku(matrix)
matrix.collect { |i| i.collect { |j| j } }
end
|