上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页
摘要: class Solution { public: int leastBricks(vector<vector<int>>& wall) { unordered_map<int,int> un_map; if(wall.size()==0) return 0; for(int i = 0; i < w 阅读全文
posted @ 2021-08-13 20:13 三一一一317 阅读(54) 评论(0) 推荐(0)
摘要: 参考: https://leetcode-cn.com/problems/combination-sum-ii/solution/hui-su-suan-fa-jian-zhi-python-dai-ma-java-dai-m-3/ class Solution { public: vector<v 阅读全文
posted @ 2021-08-13 17:43 三一一一317 阅读(26) 评论(0) 推荐(0)
摘要: class Solution { public: vector<vector<int>> res; vector<vector<int>> permuteUnique(vector<int>& nums) { vector<int> temp; for(int i = 0; i < nums.siz 阅读全文
posted @ 2021-08-13 16:14 三一一一317 阅读(31) 评论(0) 推荐(0)
摘要: /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), rig 阅读全文
posted @ 2021-08-13 13:39 三一一一317 阅读(16) 评论(0) 推荐(0)
摘要: 思想很重要 class Solution { public: void solve(vector<vector<char>>& board) { int m = board.size(); int n = board[0].size(); // 从边缘开始,因为四周肯定不被包围,和四周O联通的先调用 阅读全文
posted @ 2021-08-13 12:04 三一一一317 阅读(23) 评论(0) 推荐(0)
摘要: class Solution { public: bool exist(vector<vector<char>>& board, string word) { int m = board.size(); int n = board[0].size(); bool res = false; vecto 阅读全文
posted @ 2021-08-12 20:01 三一一一317 阅读(33) 评论(0) 推荐(0)
摘要: class Solution { public: vector<vector<int>> res; vector<vector<int>> combine(int n, int k) { vector<int> temp; vector<int> nums; // 构建一个nums数组避免下标0数字 阅读全文
posted @ 2021-08-12 18:19 三一一一317 阅读(26) 评论(0) 推荐(0)
摘要: class Solution { public: vector<vector<int>> res; vector<vector<int>> permute(vector<int>& nums) { vector<int> temp; for(int i = 0; i < nums.size(); i 阅读全文
posted @ 2021-08-12 17:15 三一一一317 阅读(25) 评论(0) 推荐(0)
摘要: 解析参考: https://leetcode-cn.com/problems/pacific-atlantic-water-flow/solution/shui-wang-gao-chu-liu-by-xiaohu9527-xxsx/ class Solution { public: vector< 阅读全文
posted @ 2021-08-12 16:44 三一一一317 阅读(53) 评论(0) 推荐(0)
摘要: class Solution { public: int findCircleNum(vector<vector<int>>& isConnected) { int count = 0; int m = isConnected.size(); vector<bool> visited(m,false 阅读全文
posted @ 2021-08-12 15:28 三一一一317 阅读(24) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页