Solving Sudoku puzzle with Ruby algorithm