← Uber Interview Insights

Uber·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026Remote

Summary

Uber SWE interview, system design flavored coding round. One problem, a meeting room scheduler, with a follow-up on data structure choice. Pretty focused session, no behavioral stuff at all.

Questions Asked (1)

Q1

Design a meeting scheduler: given a list of rooms, each with existing meetings as [start, end] intervals, implement a function that takes a new meeting [s, e] and returns any room ID that can fit it without overlap, or null if none can.

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

My first instinct was to sort and binary search within each room's meeting list to find the insertion point, then just check the neighbors for overlap.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem constraints (e.g., number of rooms, meetings per room, whether intervals are sorted, and if we need to return any room or optimize for utilization). Then propose an efficient algorithm: for each room, check if the new meeting overlaps with any existing meeting using interval overlap logic; if not, return that room. Discuss time complexity and possible optimizations like sorting intervals or using interval trees.

Pro tip: Mention that in real systems like Uber, you'd likely need to handle concurrency and scale, so you might use a database with proper indexing or a distributed lock, but for this coding problem, focus on the algorithmic solution and clearly state assumptions.

1. Clarify requirements and constraints

Ask about input size, whether intervals are sorted, if rooms have capacities or other attributes, and if we need to optimize for any metric (e.g., earliest available room).

2. Define overlap condition

Two intervals [s1, e1] and [s2, e2] overlap if s1 < e2 and s2 < e1. Use this to check against each existing meeting.

3. Design algorithm

Iterate through each room; for each, check all existing meetings for overlap. If none overlap, return room ID. If no room fits, return null.

4. Analyze complexity and optimize

Time complexity O(R * M) where R is number of rooms and M is average meetings per room. Discuss optimizations: sort intervals per room and use binary search, or use interval trees for O(log M) per room.

5. Discuss edge cases and extensions

Handle empty room list, meetings that touch at endpoints (non-overlap), and consider extensions like recurring meetings, time zones, or concurrency.

Key Points to Mention

  • Overlap condition: s1 < e2 and s2 < e1 (strict inequality for non-overlap at endpoints).
  • Time complexity: O(R * M) naive; can optimize to O(R log M) with sorted intervals and binary search.
  • Space complexity: O(1) extra if checking in place, or O(M) if storing sorted intervals.
  • Edge cases: empty rooms, no existing meetings, meeting exactly at boundaries, invalid intervals (s >= e).
  • Trade-offs: simplicity vs. performance; sorting intervals upfront may be beneficial if many queries.
  • Real-world considerations: concurrency, distributed systems, database indexing, and room attributes (capacity, equipment).

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