LeetCode周赛
DlPF_C
这个作者很懒,什么都没留下…
展开
-
LeetCode 894 All Possible Full Binary Trees
题目地址:https://leetcode.com/problems/all-possible-full-binary-trees/description/ 对二叉树的递归构造。 对奇数枚举左右子树点的个数,偶数不符合条件直接返回 /** * Definition for a binary tree node. * struct TreeNode { * int val; ...转载 2018-09-08 21:21:23 · 237 阅读 · 0 评论 -
LeetCode 895. Maximum Frequency Stack
题目地址:https://leetcode.com/problems/maximum-frequency-stack/description/ 优先队列模拟栈 class FreqStack { public: struct Node { int x,y,p; bool operator < (const Node &N) con...转载 2018-09-08 21:23:56 · 346 阅读 · 0 评论