随笔分类 -  pq

692 Top K Frequent Words
摘要:这个写的少, pq 里存的 是 map.entry<string, integer> 自己 这些 comparator overide 要专门写, 然后 maxheap(a,b). a < b, return 1 minheap(a, b) a < b, return -1 map.entryset 阅读全文

posted @ 2018-08-10 14:34 猪猪&#128055;

23. Merge k Sorted Lists
摘要:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 阅读全文

posted @ 2018-08-09 17:34 猪猪&#128055;

253. Meeting Rooms II
摘要:if the new interval's start is later than the smallest end index in our pq. then we can use the same room, and update the end , put it back to the pq. 阅读全文

posted @ 2018-08-09 17:03 猪猪&#128055;

导航