InterviewDB
Question
Puzzle Checker: Validate That a Completed Puzzle Satisfies All Constraints
Question Details
Problem You are given a completed 9x9 Sudoku board. Validate that it is a correct solution: every row, column, and 3x3 box contains the digits 1-9 exactly once. Example: Round 2 - Variant Extend to a general n x n puzzle (where n is a perfect square). Accept a board and a custom constraint function is_valid_group(group: list[int]) -> bool and validate using it. Follow-ups What is the time complexity of your validation? How would you validate a partially filled board (cells may contain 0 for empt…
Full Details
🔒
Unlock all Karat questions
Full insider details, leaked discussions, and candidate experiences.
or every company, $100/year →About This Question
This is a reported interview question from a karat interview.
It covers the following topics: Coding, Backtracking .