摘要:
https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ //注意是二叉搜索树 class Solution { public: TreeNode* ans; void dfs(TreeNode* 阅读全文
posted @ 2021-03-28 17:27
rxh1999
阅读(29)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/947f6eb80d944a84850b0538bf0ec3a5?tpId=13&tqId=11179&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 16:43
rxh1999
阅读(41)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/b736e784e3e34731af99065031301bca?tpId=13&tqId=11177&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 15:35
rxh1999
阅读(66)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/a861533d45854474ac791d90e447bafd?tpId=13&tqId=11176&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 14:38
rxh1999
阅读(51)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/91b69814117f4e8097390d107d2efbe0?tpId=13&tqId=11212&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 13:51
rxh1999
阅读(29)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/445c44d982d04483b04a54f298796288?tpId=13&tqId=11213&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 13:36
rxh1999
阅读(60)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/7fe2212963db4790b57431d9ed259701?tpId=13&tqId=11175&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 12:56
rxh1999
阅读(39)
评论(0)
推荐(0)
摘要:
https://www.nowcoder.com/practice/ff05d44dfdb04e1d83bdbdab320efbcb?tpId=13&tqId=11211&tPage=1&rp=1&ru=%2Fta%2Fcoding-interviews&qru=%2Fta%2Fcoding-int 阅读全文
posted @ 2021-03-28 12:52
rxh1999
阅读(47)
评论(0)
推荐(0)
摘要:
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * } 阅读全文
posted @ 2021-03-28 12:43
rxh1999
阅读(38)
评论(0)
推荐(0)
摘要:
class Solution { public: bool check(TreeNode* pRoot1, TreeNode* pRoot2){ if(pRoot2 == nullptr){ return true; } if(pRoot1 == nullptr){ return false; } 阅读全文
posted @ 2021-03-28 12:33
rxh1999
阅读(33)
评论(0)
推荐(0)
摘要:
/* struct TreeLinkNode { int val; struct TreeLinkNode *left; struct TreeLinkNode *right; struct TreeLinkNode *next; TreeLinkNode(int x) :val(x), left( 阅读全文
posted @ 2021-03-28 12:03
rxh1999
阅读(45)
评论(0)
推荐(0)
摘要:
class Solution { public: TreeNode* f(vector<int>& pre, int pleft, int pright, vector<int>& vin, int vleft, int vright){ if(pleft>pright) return nullpt 阅读全文
posted @ 2021-03-28 11:29
rxh1999
阅读(34)
评论(0)
推荐(0)
摘要:
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/class Solution { public: ListNode* FindFirstCommonNo 阅读全文
posted @ 2021-03-28 10:11
rxh1999
阅读(38)
评论(0)
推荐(0)
摘要:
/* struct RandomListNode { int label; struct RandomListNode *next, *random; RandomListNode(int x) : label(x), next(NULL), random(NULL) { } }; */ class 阅读全文
posted @ 2021-03-28 09:56
rxh1999
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号