Meeting Rooms Allocation Problem Statement

Stark Industry is planning to organize meetings for various departments in preparation for Stark Expo. Due to limited rooms in Stark Tower, the goal is to allocate meeting rooms such that all meetings are organized using the minimum number of conference rooms, ensuring that at any given moment, only one meeting occupies a room. Your task is to help JARVIS, who is preoccupied, by determining the minimum number of conference rooms required.

Explanation:

You are provided with an array ARR of size N x 2, where each pair represents the start and end time for N meetings. Compute the minimum number of rooms needed to conduct all meetings.

Input:

The format is as follows: The first line contains an integer 'T' indicating the number of test cases. For each test case, the input includes: 
 - An integer 'N' that denotes the number of meetings. 
 - A second line with 'N' space-separated integers for the start times of these meetings. 
 - A third line with 'N' space-separated integers for the end times of these meetings.

Output:

Output a single integer for each test case, representing the minimum number of conference rooms required. Each output should be on a new line for different test cases.

Example:

Consider the following meeting schedules: 
1pm - 4pm
3pm - 5pm
4pm - 6pm
For these schedules:
- Meeting 1 takes room 1 until 4pm.
- Meeting 2 needs a separate room as it starts at 3pm.
- Meeting 3 can use room 1 after meeting 1 concludes at 4pm.
Thus, a minimum of 2 rooms are required.

Constraints:

  • 1 <= T <= 100
  • 1 <= N <= 1000
  • 0000 <= INTERVAL[start][end] <= 2359
  • Ensure solutions strive for linear time complexity.

Note:

All meetings are assumed to occur on the same day. If a meeting's starting time coincides with another's ending time, it can proceed in the same room.
AnswerBot
1y

The task is to find the minimum number of conference rooms required to organize all the meetings.

  • Sort the meetings based on their start time.

  • Initialize a priority queue to store the end times of the m...read more

Help your peers!
Select
Add answer anonymously...

Texas Instruments Software Developer Intern interview questions & answers

A Software Developer Intern was asked Q. Meeting Rooms Allocation Problem Statement Stark Industry is planning to organiz...read more
A Software Developer Intern was asked Q. Maximum Sum Rectangle Problem Given an M x N matrix of integers ARR, your task i...read more
A Software Developer Intern was asked Q. Josephus Problem Statement Consider 'N' individuals standing in a circle, number...read more

Popular interview questions of Software Developer Intern

A Software Developer Intern was asked Q1. Meeting Rooms Allocation Problem Statement Stark Industry is planning to organiz...read more
A Software Developer Intern was asked Q2. Maximum Sum Rectangle Problem Given an M x N matrix of integers ARR, your task i...read more
A Software Developer Intern was asked Q3. Josephus Problem Statement Consider 'N' individuals standing in a circle, number...read more
Texas Instruments Software Developer Intern Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits