| TreeMap | Heap | PriorityQueue | |
| Insert() | log(n) | log(n) | log(n) |
| Delete() | log(n) | log(n) | O(n) |
| Pop() | log(n) | log(n) | log(n) |
| Find() | log(n) | log(n) | Not support |
| Modify() | log(n) | log(n) | Not support |
| Min / Max | log(n) | O(1) | O(1) |
| Upper / Lower | log(n) | Not support | Not support |
Upper -> 小于Y的最大值
相关的练习:
https://leetcode.com/problems/implement-queue-using-stacks
https://leetcode.com/problems/implement-stack-using-queues/description
https://leetcode.com/problems/flatten-nested-list-iterator/description
https://leetcode.com/problems/binary-search-tree-iterator
https://leetcode.com/problems/zigzag-iterator
https://leetcode.com/problems/flatten-2d-vector
https://leetcode.com/problems/lru-cache
https://leetcode.com/problems/top-k-frequent-words
https://leetcode.com/problems/ugly-number-ii
