← Uber Interview Insights

Uber·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Did a coding round for a Software Engineer role at Uber. Two algorithm problems, one of which I'd seen before in a slightly different form, one I hadn't. Nothing too wild but the binary search one required more careful thinking than I expected.

Questions Asked (2)

Q1

You have a list of vault sizes [3, 6, 7, 11] and 8 hours total. Find the minimum integer rate k (units per hour) such that processing all vaults finishes within the time limit.

Algorithms & Data Structures
Author's notes

Binary search on the answer, which I knew conceptually but fumbled the boundary conditions at first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize this as a binary search on the answer problem: the minimum rate k is monotonic, so binary search over k in [1, max(vaults)] and for each k check if the total hours (sum of ceil(vault/k)) is ≤ 8. Return the smallest feasible k.

Pro tip: Mention that the upper bound can be max(vaults) because at that rate each vault takes at most 1 hour, and clarify that hours are integer hours per vault (ceil division) to avoid off-by-one errors.

1. Understand the problem and constraints

Clarify that each vault must be processed entirely within an integer number of hours, so time for a vault is ceil(size/k). The total time must be ≤ 8 hours.

2. Identify monotonicity and search space

Observe that if a rate k works, any larger rate also works. Thus binary search on k from 1 to max(vaults) (or sum(vaults)) to find the minimum feasible rate.

3. Implement feasibility check

For a given k, compute total hours = sum(ceil(vault/k) for vault in vaults). If total ≤ 8, k is feasible; else not.

4. Binary search for minimum k

Perform binary search: while low < high, mid = (low+high)//2; if feasible(mid), set high = mid; else low = mid+1. Return low.

5. Verify with example and edge cases

Test with the given list [3,6,7,11] and 8 hours. Check k=3: hours = 1+2+3+4=10 >8; k=4: 1+2+2+3=8 ≤8, so answer is 4. Also consider edge cases like empty list or k=0.

Key Points to Mention

  • Binary search on the answer (rate k) due to monotonicity.
  • Feasibility check using ceiling division: sum(ceil(vault/k)).
  • Time complexity: O(n log(max(vaults))) where n is number of vaults.
  • Space complexity: O(1) extra space.
  • Upper bound for binary search: max(vaults) or sum(vaults) to ensure feasibility.
  • Handling integer division correctly to avoid floating-point errors.

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

Q2

Given the integer set {2, 5, 3, 11} and a target of 10, determine whether any subset sums to the target.

Algorithms & Data Structures
Author's notes

Classic subset-sum.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: whether it's a decision problem (yes/no) or if we need to find the actual subset. Then, explain that this is the classic Subset Sum problem, which can be solved using dynamic programming or recursion with memoization, and walk through a simple example with the given set to demonstrate the approach.

Pro tip: Mention the trade-offs between different approaches (e.g., DP vs. meet-in-the-middle) and discuss how the solution scales with input size, showing awareness of real-world constraints like memory and time limits.

1. Clarify the problem

Confirm whether the task is to return a boolean (exists or not) or to find all subsets that sum to the target. Also, check if the set can contain negative numbers or if it's strictly positive.

2. Choose an approach

Decide between dynamic programming (for small target values) or recursion with backtracking (for small set sizes). Explain the time and space complexity of each.

3. Walk through the example

Apply the chosen approach to the given set {2, 5, 3, 11} and target 10. Show step-by-step how you determine if a subset sums to 10.

4. Discuss optimizations and edge cases

Mention pruning techniques (e.g., sorting and early termination) and handle edge cases like empty set, target 0, or large inputs.

5. Conclude with the answer

State clearly whether a subset exists (e.g., {2, 3, 5} sums to 10) and summarize the reasoning.

Key Points to Mention

  • Definition of the Subset Sum problem and its NP-completeness.
  • Dynamic programming solution using a boolean table of size target+1.
  • Recursive backtracking with memoization to avoid redundant computations.
  • Time and space complexity analysis: O(n*target) for DP, O(2^n) for brute force.
  • Handling of duplicate elements and negative numbers if applicable.
  • Real-world applications like resource allocation or load balancing.

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