摘要:
链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array-ii/ 代码 class Solution { public: int removeDuplicates(vector<int>& nums) { int 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/word-search/ 代码 class Solution { public: bool exist(vector<vector<char>>& board, string word) { for (int i = 0; i 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/subsets/ 代码 class Solution { public: vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int>> ans; int 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/combinations/ 代码 class Solution { public: vector<vector<int>> ans; vector<int> path; vector<vector<int>> combine(i 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/minimum-window-substring/ 代码 class Solution { public: string minWindow(string s, string t) { unordered_map<char, i 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/sort-colors/ 代码 class Solution { public: void sortColors(vector<int>& nums) { for (int i = 0, j = 0, k = nums.size 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/search-a-2d-matrix/ 代码 class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { if (m 阅读全文
摘要:
链接:https://leetcode-cn.com/problems/set-matrix-zeroes/ 代码 class Solution { public: void setZeroes(vector<vector<int>>& matrix) { if (matrix.empty() || 阅读全文