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.
Expected Time Complexity: O(N*log(N))
Expected Auxiliary Space: O(N)