摘要: class Solution { public: int trap(vector<int>& height) { int l = 0, r = height.size()-1, level = 0, water = 0; while (l < r) { int lower = height[height[l] < height[r] ? l++ : r--]; level = max(level, 阅读全文
posted @ 2019-11-26 20:20 强威 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.顺时针: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place 阅读全文
posted @ 2019-11-26 20:18 强威 阅读(288) 评论(0) 推荐(0) 编辑