Description:
Solution:
We have two list: start & end.
ex)
start: [0, 5, 15]
end: [10, 20, 30]
We shift the start pointer when start[s] is less than end[e] => count += 1
We shift the end pointer when start[s] is equal or more thn end[e] => count -= 1
Time Complexity: O(nlogn)
Space Complexity: O(n)
'LeetCode ๐๏ธ > Interval' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
37. Meeting Rooms (0) | 2023.06.26 |
---|---|
435. Non-overlapping Intervals (0) | 2023.06.25 |
56. Merge Intervals (0) | 2023.06.24 |
57. Insert Interval (0) | 2023.06.23 |