摘要: 根据BST的前序遍历重建BST 1. 平均O(NlogN) 最坏O(N^2) class Solution { public: TreeNode* dfs(int l, int r, vector<int>& p) { if (l > r) return nullptr; TreeNode* nod 阅读全文
posted @ 2020-07-23 12:23 betaa 阅读(114) 评论(0) 推荐(0) 编辑