摘要: 链接:https://leetcode-cn.com/problems/pascals-triangle/ 代码 class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> ans; 阅读全文
posted @ 2020-07-26 21:41 景云ⁿ 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node-ii/ 代码 /* // Definition for a Node. class Node { public: int val; Node 阅读全文
posted @ 2020-07-26 21:27 景云ⁿ 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/ 代码 /* // Definition for a Node. class Node { public: int val; Node* l 阅读全文
posted @ 2020-07-26 21:19 景云ⁿ 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/distinct-subsequences/ 代码 class Solution { public: int numDistinct(string s, string t) { int n = s.size(), m = t.s 阅读全文
posted @ 2020-07-26 14:36 景云ⁿ 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/flatten-binary-tree-to-linked-list/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * T 阅读全文
posted @ 2020-07-26 14:26 景云ⁿ 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/path-sum-ii/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNo 阅读全文
posted @ 2020-07-26 14:17 景云ⁿ 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/path-sum/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode 阅读全文
posted @ 2020-07-26 14:10 景云ⁿ 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNod 阅读全文
posted @ 2020-07-26 14:03 景云ⁿ 阅读(61) 评论(0) 推荐(0) 编辑