上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 28 下一页
摘要: 链接:https://leetcode-cn.com/problems/same-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode 阅读全文
posted @ 2020-07-19 10:08 景云ⁿ 阅读(106) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/recover-binary-search-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode 阅读全文
posted @ 2020-07-19 10:04 景云ⁿ 阅读(72) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/validate-binary-search-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode 阅读全文
posted @ 2020-07-18 15:54 景云ⁿ 阅读(97) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/interleaving-string/ 代码 class Solution { public: bool isInterleave(string s1, string s2, string s3) { int n = s1.s 阅读全文
posted @ 2020-07-18 10:07 景云ⁿ 阅读(85) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/unique-binary-search-trees/ 代码 class Solution { public: int numTrees(int n) { vector<int> f(n + 1); f[0] = 1; for 阅读全文
posted @ 2020-07-18 09:50 景云ⁿ 阅读(53) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/unique-binary-search-trees-ii/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNo 阅读全文
posted @ 2020-07-18 09:38 景云ⁿ 阅读(69) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/binary-tree-inorder-traversal/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNo 阅读全文
posted @ 2020-07-18 09:09 景云ⁿ 阅读(54) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/restore-ip-addresses/ 代码 class Solution { public: vector<string> ans; vector<string> restoreIpAddresses(string s) 阅读全文
posted @ 2020-07-16 21:26 景云ⁿ 阅读(66) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/reverse-linked-list-ii/ 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *nex 阅读全文
posted @ 2020-07-16 21:14 景云ⁿ 阅读(53) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/decode-ways/ 代码 class Solution { public: int numDecodings(string s) { int n = s.size(); s = ' ' + s; vector<int> f 阅读全文
posted @ 2020-07-16 21:03 景云ⁿ 阅读(142) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 28 下一页