摘要:
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
阅读(27)
评论(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
阅读(32)
评论(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
阅读(26)
评论(0)
推荐(0)