Google Schedule of Tasks
2019-07-22 本文已影响17人
vicbang
Question:
Input: [[1, 10], [2, 6], [9, 12], [14, 16], [16, 17]]
Output union: [[1, 12], [14, 17]]
Output intersection: [[2, 6], [9, 10]]
![](https://img.haomeiwen.com/i18844357/cefc6c7bf3ddf4c3.png)
Java Answer: Use Java PriorityQueue
![](https://img.haomeiwen.com/i18844357/02979bf1dce6e135.png)
Java Answer: Use Java PriorityQueue