← Verkada Inc. Interview Insights

Verkada Inc.·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jun 2026Remote

Summary

Verkada software engineer screen that was basically one coding problem plus a threading tangent I was not fully prepared for. The main question was straightforward but the follow-up is where things got interesting.

Questions Asked (2)

Q1

Given a 9x9 Sudoku board where some cells are empty (marked as '.'), write a function to determine whether the current state is valid. A board is valid if no row, column, or 3x3 sub-box contains duplicate digits from 1 to 9. Empty cells are ignored.

Algorithms & Data Structures
Author's notes

Knocked this out fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Use a single pass over the board, maintaining hash sets for each row, column, and 3x3 sub-box to detect duplicates. For each non-empty cell, compute its sub-box index and check if the digit already exists in any of the three sets; if so, return false. If the entire board is processed without conflicts, return true.

Pro tip: Mention that you can optimize space by using bitmasks instead of hash sets, and that the solution runs in O(1) time and space since the board size is fixed. Also, clarify that you're only validating the current state, not solving the Sudoku.

1. Clarify the problem

Confirm that the board is 9x9, empty cells are '.', and we only need to check validity of the current state, not solvability. Ask if the input is guaranteed to be well-formed.

2. Choose data structures

Decide to use hash sets (or boolean arrays/bitmasks) for rows, columns, and sub-boxes to track seen digits. Explain that this allows O(1) duplicate checks.

3. Iterate through the board

Loop over each cell; skip if it's '.'. For each digit, compute its row index, column index, and sub-box index (using integer division). Check if the digit is already in the corresponding sets.

4. Handle duplicates

If a duplicate is found in any set, immediately return false. Otherwise, add the digit to all three sets and continue.

5. Return result and analyze complexity

After processing all cells, return true. State that time and space complexity are O(1) because the board size is constant (81 cells).

Key Points to Mention

  • Use of hash sets or boolean arrays to track seen digits per row, column, and sub-box.
  • Sub-box index calculation: (row / 3) * 3 + (col / 3).
  • Single-pass solution with early termination on duplicate detection.
  • Time and space complexity are O(1) due to fixed board size.
  • Edge cases: empty board, board with all digits filled, and boards with multiple duplicates.
  • Alternative approach: bitmasking for space efficiency (e.g., using integers to represent sets).

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

Q2

How would you use multithreading to speed up the Sudoku validation, and does it actually help for a problem this size? Where would parallelism make more sense?

Technical Trade-offsSystem Design
Author's notes

This is where I stumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining how you would parallelize Sudoku validation (e.g., splitting rows, columns, and subgrids across threads) and then critically evaluate whether it's worth it for a 9x9 grid. Conclude by discussing where parallelism actually provides meaningful speedup, such as in larger-scale or real-time systems.

Pro tip: Acknowledge that for a 9x9 Sudoku, the overhead of thread creation and synchronization likely outweighs the benefits, showing you understand Amdahl's Law and practical performance considerations. Then pivot to scenarios where parallelism is essential, like validating millions of boards or in distributed systems.

1. Explain the parallelization strategy

Describe how you would divide the validation task: assign each row, column, and 3x3 subgrid to separate threads or use a thread pool to process them concurrently.

2. Analyze the problem size and overhead

Discuss the small size of a 9x9 Sudoku (81 cells) and argue that the overhead of thread creation, synchronization, and context switching likely negates any speedup.

3. Consider alternative approaches

Mention that a single-threaded solution with efficient data structures (e.g., bitmasks) is simpler, less error-prone, and fast enough for this problem size.

4. Identify where parallelism makes sense

Shift focus to larger-scale problems: validating many Sudoku boards in parallel, real-time validation in a high-throughput service, or similar tasks like image processing or large matrix operations.

5. Conclude with trade-offs

Summarize that parallelism is a tool to be applied judiciously, considering problem size, overhead, and complexity, and that for small tasks, simplicity often wins.

Key Points to Mention

  • Thread pool vs. manual thread creation for task parallelism
  • Amdahl's Law and the impact of synchronization overhead
  • Use of efficient single-threaded algorithms (e.g., bitmask validation)
  • Scalability: when the problem size grows, parallelism becomes beneficial
  • Real-world examples where parallelism is crucial (e.g., batch processing, distributed systems)
  • Trade-offs between code complexity and performance gains

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