Leetcode 253. Meeting Rooms II [Algo + Code + Time/Space Complexity]
13.8 هزار بار بازدید -
4 سال پیش
-
One of the most frequently
One of the most frequently asked coding interview questions on Arrays in companies like Google, Facebook, Amazon, LinkedIn, Microsoft, Uber, Apple, Adobe, Bloomberg etc.
LeetCode : Meeting Rooms II
Problem URL - https://leetcode.com/problems/meeting...
Time complexity - O(N * log N)
Space Complexity - O(N)
where N is length of given input array.
Question : Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] , find the minimum number of conference rooms required.
Example 1:
Input: [[0, 30],[5, 10],[15, 20]]
Output: 2
Example 2:
Input: [[7,10],[2,4]]
Output: 1
Connect with me on LinkedIn at: LinkedIn: jayati-tiwari
#leetcode, #coding, #algorithms, #facebook, #leetcode252, #meetingroomsII, #google, #bloomberg, #apple
LeetCode : Meeting Rooms II
Problem URL - https://leetcode.com/problems/meeting...
Time complexity - O(N * log N)
Space Complexity - O(N)
where N is length of given input array.
Question : Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] , find the minimum number of conference rooms required.
Example 1:
Input: [[0, 30],[5, 10],[15, 20]]
Output: 2
Example 2:
Input: [[7,10],[2,4]]
Output: 1
Connect with me on LinkedIn at: LinkedIn: jayati-tiwari
#leetcode, #coding, #algorithms, #facebook, #leetcode252, #meetingroomsII, #google, #bloomberg, #apple
4 سال پیش
در تاریخ 1399/09/22 منتشر شده
است.
13,875
بـار بازدید شده