摘要: 如图所示,假设左边小于右边 通过如下分析,双指针每次只需要移动较小那边即可,因为只有移动较小那边才有比初始的容量大的可能 代码如下: class Solution { public: int maxArea(vector<int>& height) { int i = 0, j = height.s 阅读全文
posted @ 2020-12-18 15:55 herrhu 阅读(76) 评论(0) 推荐(0)