Determine if a 9×9 Sudoku board is valid. Only the filled cells need to be validated according to these rules:
Use three sets of hash sets — one for rows, columns, and boxes. For each filled cell, check all three sets.
The 3×3 box index can be computed as (row // 3, col // 3).
is_valid_row([5, 3, '.', '.', 7, '.', '.', '.', '.'])
True
is_valid_row([5, 3, '.', '.', 5, '.', '.', '.', '.'])
False