摘要:
https://leetcode.cn/problems/construct-binary-tree-from-inorder-and-postorder-traversal/ 思路和106. 从中序与后序遍历序列构造二叉树相同 /** * Definition for a binary tree 阅读全文
摘要:
https://leetcode.cn/problems/top-k-frequent-elements/description/ 可以考虑使用HashMap+排序,不过直接使用优先队列也挺不错,可以使用大顶堆或小顶堆 class Solution { public int[] topKFreque 阅读全文