← Confluent Interview Insights

Confluent·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Confluent SWE interview with a Sudoku validation problem. Pretty standard coding round, nothing too wild, but the edge cases kept me second-guessing myself.

Questions Asked (1)

Q1

Given a 9x9 Sudoku board that may be fully or only partially filled in, write a function to determine whether the current state is valid.

Algorithms & Data Structures
Author's notes

I jumped straight to the fully-completed case and started coding row/column checks before they clarified it could be partial.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify that 'valid' means no duplicate digits in any row, column, or 3x3 sub-box, ignoring empty cells. Then propose a single-pass solution using hash sets (or boolean arrays) to track seen digits for each row, column, and box, checking for duplicates as you iterate over the board. Discuss time and space complexity, and mention possible optimizations like bitmasking.

Pro tip: Mention that you can validate the board in one pass by mapping each cell to its corresponding 3x3 box index (row/3)*3 + col/3, and using a set per box. This shows you understand how to avoid redundant scans and handle the problem efficiently.

1. Clarify requirements and constraints

Confirm that 'valid' means no duplicate numbers in any row, column, or 3x3 sub-box, and that empty cells (often represented by '.' or 0) are ignored. Ask about input format and whether the board is guaranteed to be 9x9.

2. Choose data structures for tracking

Decide to use hash sets or boolean arrays for each row, column, and box to track seen digits. Explain that this allows O(1) duplicate checks.

3. Iterate through the board once

Loop over each cell; if it's not empty, compute its box index and check if the digit already exists in the corresponding row, column, or box set. If it does, return false immediately.

4. Add digit to tracking structures

If no duplicate is found, add the digit to the row, column, and box sets to mark it as seen.

5. Return true if no duplicates found

After processing all cells, return true, indicating the board is valid. Discuss time complexity O(1) since board size is fixed (81 cells), and space O(1) as well.

Key Points to Mention

  • Definition of a valid Sudoku board: no duplicates in rows, columns, or 3x3 sub-boxes.
  • Handling empty cells: skip them during validation.
  • Using hash sets or boolean arrays for O(1) lookups.
  • Computing the 3x3 box index: (row / 3) * 3 + (col / 3).
  • Single-pass solution with time and space complexity O(1) due to fixed board size.
  • Alternative approach: bitmasking for space efficiency (e.g., using integers to represent seen digits).

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