Skip to content

Instantly share code, notes, and snippets.

View kmbenjel's full-sized avatar

Khalid Benjelloun kmbenjel

View GitHub Profile
@kmbenjel
kmbenjel / sudoku.rb
Created August 14, 2021 03:37 — forked from gregnavis/sudoku.rb
A simple Sudoku solver in Ruby.
class Sudoku
SIZE = 9
NUMBERS = (1..9).to_a
def initialize
@board = Array.new(SIZE) { Array.new(SIZE, nil) }
end
def [](x, y)
@board[y][x]