摘要:
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
阅读(34)
评论(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
阅读(34)
评论(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
阅读(35)
评论(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
阅读(62)
评论(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
阅读(37)
评论(0)
推荐(0)
摘要:
class Solution { public: int maxAreaOfIsland(vector<vector<int>>& grid) { int maxarea = 0; int m = grid.size(); int n = grid[0].size(); if(m==0||n==0) 阅读全文
posted @ 2021-08-12 14:52
三一一一317
阅读(31)
评论(0)
推荐(0)
摘要:
class Solution { public: void sortColors(vector<int>& nums) { int i = 0; int j = nums.size()-1; int left = 0; int right = nums.size()-1; // 遍for循环,第一遍 阅读全文
posted @ 2021-08-12 13:15
三一一一317
阅读(39)
评论(0)
推荐(0)
摘要:
class Solution { public: int trap(vector<int>& height) { vector<int> left(height.size(),0); vector<int> right(height.size(),0); int lefttemp = 0; int 阅读全文
posted @ 2021-08-12 11:12
三一一一317
阅读(28)
评论(0)
推荐(0)

浙公网安备 33010602011771号