find_empty: Find the first empty cell in a sudoku grid

View source: R/find_empty.R

find_emptyR Documentation

Find the first empty cell in a sudoku grid

Description

This function finds the next empty/unfilled cell in a sudoku grid. It starts from the left topmost cell through all cells in that row then onto the next row and so on.

Usage

find_empty(board)

Arguments

board

A sudoku board/grid.

Value

A numeric vector giving the row and column of the empty cell. Returns NULL if all cells are filled.

Examples

find_empty(sample_boards()[[1]])


KennedyMwavu/SudokuR documentation built on Jan. 2, 2023, 9:07 p.m.