【leetcode】盛水最多的容器【C++】

题目如下: 解题思路: 1、最简单的思路就是暴力求解,采用两次循环,时间复杂度为O(n^2)。 代码如下: class Solution { public: int maxArea(vector<int>& height) { int length = height.size(); int max = 0; int temp = 0;
相关文章
相关标签/搜索