Problem Submissions Solution

Maximum Meetings in One Room

Difficulty: Medium

Acceptance: %

Points: 30.00

In a company, there is only one meeting room available. The company has N meetings, each with a start time S[i] and a finish time F[i]. The goal is to determine the maximum number of meetings that can be scheduled in the room. A meeting can only be scheduled if its start time is strictly later than the finish time of the previous meeting. If two meetings can be scheduled at the same time, select the one that finishes earlier.

Additionally, print the indices of all the meetings that are selected.

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(N*log(N))

Expected Auxiliary Space: O(N)

Constraints:
  • 1 <= N <= 10^5
  • 0 <= S[i] <= F[i] <= 10^9
  • Sum of N over all test cases doesn't exceeds 10^6
Companies:
Visa Adobe Flipkart
Topics:
Array Sorting Algorithms
Locked Content
Access Restricted: Please Login to access the code editor and test cases.