← Uber Interview Insights

Uber·Software Engineer·Onsite - Coding / Algorithms·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Uber onsite coding round for SWE, one question the whole time: design and implement a random Bingo card generator with some tricky constraints around rows and columns. Not your typical leetcode grind, more of a design-your-way-through-it problem.

Questions Asked (1)

Q1

Design and implement a random 3x9 Bingo board generator where each row has exactly 5 numbers and 4 blanks, each column is restricted to a specific decade range (e.g. column 0 holds 1-10, column 1 holds 11-20, etc.), and cells are filled probabilistically while keeping all row and column constraints satisfiable throughout the process.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

The part that got me was the feasibility check.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the constraints and edge cases, then propose a backtracking algorithm that fills cells probabilistically while ensuring each row has exactly 5 numbers and each column's numbers fall within its decade range. Discuss how to maintain satisfiability by checking row and column counts and using randomization with backtracking to avoid dead ends.

Pro tip: Mention that you can precompute the number of ways to fill each row given column constraints to guide probabilistic choices, and use a randomized backtracking approach with early pruning to ensure efficiency.

1. Clarify constraints and edge cases

Confirm the board size, row/column constraints, and decade ranges. Discuss whether numbers within a column must be unique and whether the board should be uniformly random among all valid boards.

2. Choose an algorithm

Propose a backtracking algorithm that fills cells row by row or column by column, using probabilistic choices (e.g., weighted by remaining capacity) and backtracking when constraints cannot be met.

3. Ensure satisfiability

At each step, check that the remaining empty cells can still satisfy the row's need for exactly 5 numbers and the column's decade range. Use pruning to avoid dead ends.

4. Implement and test

Write pseudocode or actual code, then test with multiple runs to ensure randomness and correctness. Consider performance for larger boards.

5. Discuss trade-offs

Compare backtracking with other approaches (e.g., precomputed templates, dynamic programming) in terms of randomness, efficiency, and complexity.

Key Points to Mention

  • Backtracking with probabilistic choices and pruning
  • Row and column constraint propagation
  • Uniform randomness and avoiding bias
  • Time and space complexity analysis
  • Handling dead ends and backtracking efficiency
  • Potential optimizations like precomputing valid row patterns

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