Untitled
unknown
plain_text
5 months ago
656 B
5
Indexable
You are given an array of meetings where meetings[i] = [startTime, endTime, roomCapacity]. Each meeting will take place during the inclusive time interval [startTime, endTime] and requires a room with at least roomCapacity people capacity. Return the minimum number of rooms needed to hold all meetings. Example: Input: meetings = [[1,4,2], [2,5,3], [3,6,2], [4,7,1]] Output: 2 Explanation: - Meeting 1: [1,4] needs capacity 2 - Meeting 2: [2,5] needs capacity 3 (can't use same room as Meeting 1) - Meeting 3: [3,6] needs capacity 2 (can use same room as Meeting 1 after it ends) - Meeting 4: [4,7] needs capacity 1 (can use same room as Meeting 1)
Editor is loading...
Leave a Comment