thoughtbot/sudoku_validator — pull request #5 by elubin (2013-10-21 01:16:46+00:00)
Title: initial contest entry

The reader parses the file and does some light validation.

The parser init parses the input into arrays of rows, columns and grids. The valid? checks for unique in those arrays.

➜ sudoku_validator git:(master) ruby SudokuValidator.rb valid_complete.sudoku
true
➜ sudoku_validator git:(master) ruby SudokuValidator.rb invalid_complete.sudoku
false
➜ sudoku_validator git:(master) ruby SudokuValidator.rb valid_incomplete.sudoku
true
➜ sudoku_validator git:(master) ruby SudokuValidator.rb invalid_incomplete.sudoku
false