上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 28 下一页
摘要: 链接:https://leetcode-cn.com/problems/subsets-ii/ 代码 class Solution { public: vector<vector<int>> ans; vector<int> path; vector<vector<int>> subsetsWith 阅读全文
posted @ 2020-07-15 21:45 景云ⁿ 阅读(50) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/gray-code/ 代码 class Solution { public: vector<int> grayCode(int n) { vector<int> ans(1, 0); while (n--) { for (int 阅读全文
posted @ 2020-07-15 21:34 景云ⁿ 阅读(58) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/merge-sorted-array/ 代码 class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { 阅读全文
posted @ 2020-07-15 21:19 景云ⁿ 阅读(57) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/scramble-string/ 代码 class Solution { public: bool isScramble(string s1, string s2) { if (s1 == s2) return true; st 阅读全文
posted @ 2020-07-15 16:37 景云ⁿ 阅读(49) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/partition-list/ 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * Lis 阅读全文
posted @ 2020-07-15 10:07 景云ⁿ 阅读(88) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/maximal-rectangle/ 代码 class Solution { public: int largestRectangleArea(vector<int>& h) { int n = h.size(); vector 阅读全文
posted @ 2020-07-15 09:58 景云ⁿ 阅读(107) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/largest-rectangle-in-histogram/ 代码 class Solution { public: int largestRectangleArea(vector<int>& h) { int n = h.s 阅读全文
posted @ 2020-07-15 09:38 景云ⁿ 阅读(123) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/ 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; * L 阅读全文
posted @ 2020-07-15 09:19 景云ⁿ 阅读(76) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list-ii/ 代码 /** * Definition for singly-linked list. * struct ListNode { * int val; 阅读全文
posted @ 2020-07-15 09:16 景云ⁿ 阅读(133) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii/ 代码 class Solution { public: bool search(vector<int>& nums, int target) { if (nu 阅读全文
posted @ 2020-07-15 09:06 景云ⁿ 阅读(96) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 28 下一页