← Verkada Interview InsightsSoftware Engineer

Verkada·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Verkada coding screen with a classic Sudoku validator problem. Pretty standard stuff for a software engineering interview, nothing too surprising but you still have to actually think through the box indexing.

Questions Asked (1)

Q1

Given a 9x9 Sudoku board that may be partially filled, write a function to determine whether the current state of the board is valid. Validation means no digit repeats in any row, column, or 3x3 sub-box. Empty cells can be ignored.

Algorithms & Data Structures
Author's notes

The row and column checks are easy enough, but the box part trips people up if they haven't seen it before.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem constraints and edge cases, then propose a solution using hash sets to track seen digits in each row, column, and 3x3 sub-box. Iterate through each cell, skipping empty cells, and check for duplicates; return false immediately if a duplicate is found, otherwise true after full traversal.

Pro tip: Mention that you can optimize space by using bitmasks instead of hash sets, and discuss the trade-offs between clarity and performance. Also, emphasize that early termination on duplicate detection can significantly speed up validation for invalid boards.

1. Clarify requirements and edge cases

Confirm that the board is 9x9, digits are '1'-'9' or '.', and that we only validate the current state, not solvability. Discuss handling of invalid characters or board sizes if applicable.

2. Choose data structures

Decide on using hash sets (or boolean arrays/bitmasks) for each row, column, and sub-box to track seen digits. Explain why this allows O(1) duplicate checks.

3. Iterate and validate

Loop through each cell; if it's not empty, compute its sub-box index (row/3, col/3) and check if the digit already exists in the corresponding row, column, or sub-box set. If duplicate, return false.

4. Return result and analyze complexity

After processing all cells, return true. State that time complexity is O(1) since the board size is fixed (81 cells), and space complexity is O(1) as well (at most 9 sets of size 9).

Key Points to Mention

  • Use of hash sets or boolean arrays for O(1) lookups
  • Sub-box index calculation: (row/3)*3 + col/3 or (row/3, col/3) as key
  • Early termination upon finding a duplicate
  • Time and space complexity analysis (O(1) due to fixed size)
  • Handling of empty cells ('.') by skipping
  • Potential optimization with bitmasks for space efficiency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.