上一页 1 2 3 4 5 6 7 8 9 ··· 28 下一页
摘要: 链接:https://leetcode-cn.com/problems/triangle/ 代码 /* * @lc app=leetcode.cn id=120 lang=cpp * * [120] 三角形最小路径和 */ // @lc code=start class Solution { pub 阅读全文
posted @ 2020-07-27 10:19 景云ⁿ 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 链接:https://leetcode-cn.com/problems/pascals-triangle-ii/ 代码 /* * @lc app=leetcode.cn id=119 lang=cpp * 第0行存储偶数行数据,第1行存储奇数行数据 * 使用行数&1进行计算 * [119] 杨辉三角 阅读全文
posted @ 2020-07-27 10:14 景云ⁿ 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 链接: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) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 28 下一页