摘要:
链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array-ii/ 代码 class Solution { public: int removeDuplicates(vector<int>& nums) { int 阅读全文
posted @ 2020-07-14 21:35
景云ⁿ
阅读(84)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/word-search/ 代码 class Solution { public: bool exist(vector<vector<char>>& board, string word) { for (int i = 0; i 阅读全文
posted @ 2020-07-14 21:27
景云ⁿ
阅读(73)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/subsets/ 代码 class Solution { public: vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> ans; int 阅读全文
posted @ 2020-07-14 18:56
景云ⁿ
阅读(55)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/combinations/ 代码 class Solution { public: vector<vector<int>> ans; vector<int> path; vector<vector<int>> combine(i 阅读全文
posted @ 2020-07-14 18:34
景云ⁿ
阅读(68)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/minimum-window-substring/ 代码 class Solution { public: string minWindow(string s, string t) { unordered_map<char, i 阅读全文
posted @ 2020-07-14 18:16
景云ⁿ
阅读(62)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/sort-colors/ 代码 class Solution { public: void sortColors(vector<int>& nums) { for (int i = 0, j = 0, k = nums.size 阅读全文
posted @ 2020-07-14 17:52
景云ⁿ
阅读(63)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/search-a-2d-matrix/ 代码 class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { if (m 阅读全文
posted @ 2020-07-14 17:36
景云ⁿ
阅读(73)
评论(0)
推荐(0)
摘要:
链接:https://leetcode-cn.com/problems/set-matrix-zeroes/ 代码 class Solution { public: void setZeroes(vector<vector<int>>& matrix) { if (matrix.empty() || 阅读全文
posted @ 2020-07-14 11:29
景云ⁿ
阅读(90)
评论(0)
推荐(0)

浙公网安备 33010602011771号