This question evaluates proficiency in algorithm design, constraint validation, and data structure selection for efficient in-place checks while reasoning about time and space complexity.
Given a partially filled 9x9 board using digits '1'–'9' and '.' for empty cells, determine whether the current configuration is valid under Sudoku rules (no duplicates per row, column, or 3x3 sub-box). Provide a one-pass algorithm that detects conflicts during a single scan, describe your data structures (e.g., bitmasks or hash sets), and analyze time and space complexity.