FastPrepMinimum Meeting Rooms with Assignments
Problems/Minimum Meeting Rooms with Assignments

Minimum Meeting Rooms with Assignments

Uber logoUber● MediumFULLTIMEPHONE SCREENONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report does not say how rooms are numbered or whether a room can be reused at the same time a meeting ends. Our version is about 97% the same as the reported question.

Given an unsorted array meetings, where meetings[i] = [start, end], assign every meeting to a room while using the minimum possible number of rooms.

  • Intervals are half-open: a room used by a meeting ending at time t may host another meeting starting at t.
  • Process meetings by increasing start time, then increasing end time, then original index.
  • Reuse the smallest available room ID; otherwise allocate the next nonnegative room ID.

Return an array whose first value is the minimum room count and whose remaining values are the room IDs for meetings in their original input order.

Function

assignMeetingRooms(meetings: int[][]) → int[]

Examples

Example 1

meetings = [[0,30],[5,10],[15,20]]return = [2,0,1,1]

Meetings 1 and 2 reuse room 1, while the long first meeting occupies room 0.

Example 2

meetings = [[7,10],[2,4]]return = [1,0,0]

The meetings do not overlap, so one room serves both despite the unsorted input.

Constraints

  • meetings is non-empty.
  • Each meeting has exactly two signed integer times with start < end.

More Uber Onsite Interview questions

  • Earliest Time All Users Are ConnectedPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Online Meeting Scheduler with Fixed RoomsONSITE INTERVIEW · Seen Oct 2026
  • Serialize and Deserialize an N-Ary TreeONSITE INTERVIEW · Seen Oct 2026
  • Longest Continuous Subarray Within an Absolute-Difference LimitONSITE INTERVIEW · Seen Oct 2026
  • K Smallest Squares from a Sorted ArrayONSITE INTERVIEW · Seen Sep 2026
  • Grid Robot Route with Charging PrioritiesPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Shortest Increasing Path to a TargetONSITE INTERVIEW · Seen Sep 2026
  • My Calendar IONSITE INTERVIEW · Seen Sep 2026
  • Per-Element Hit CounterONSITE INTERVIEW · Seen Sep 2026
  • Cheapest Round TripONSITE INTERVIEW · Seen Aug 2026

Similar questions at other companies

  • Finish Time of Fixed-Length CPU TasksGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Meeting Rooms IIeBay · PHONE SCREENeBay interview questions
  • Meeting Rooms IIByteDance · PHONE SCREENByteDance interview questions
  • Meeting Rooms IISalesforce · ONSITE INTERVIEWSalesforce interview questions
  • Generate Complete Inputs for a Supplied ClassifierGeneral Motors · ONSITE INTERVIEW
  • Meeting Rooms IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Maximum Number of Events That Can Be AttendedSnowflake · PHONE SCREENSnowflake interview questions
  • Minimum Workers with Job AssignmentsLyft · ONSITE INTERVIEWLyft interview questions
  • Meeting Rooms IIRoblox · PHONE SCREENRoblox interview questions
  • Merge K Sorted Interval ListsBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
All Uber interview questionsSee Uber hiring insights
Saved
class Solution {
    public int[] assignMeetingRooms(int[][] meetings) {
        // TODO: minimize rooms and return deterministic assignments.
    }
}
Checking account…