Leetcode Container with Most Water
来源:互联网 发布:苹果电脑系统备份软件 编辑:程序博客网 时间:2024/06/05 08:15
左右夹逼,每一次都挪动较短的板子
int maxArea(vector<int> &height) { int i = 0, j = height.size()-1; int maxx = 0; int temp = 0; // assume no overflow while(i < j){ if(height[i] < height[j]) temp = (j-i) * height[i++]; else temp = (j-i) * height[j--]; maxx = max(maxx, temp); } return maxx; }
0 0
- LeetCode: Container With Most Water
- [LeetCode]Container With Most Water
- LeetCode Container With Most Water
- LeetCode: Container With Most Water
- [Leetcode] Container With Most Water
- Leetcode: Container With Most Water
- [LeetCode] Container With Most Water
- LeetCode Container With Most Water
- [Leetcode] Container With Most Water
- [LeetCode]Container With Most Water
- LeetCode-Container With Most Water
- Container With Most Water leetcode
- LeetCode - Container With Most Water
- LeetCode: Container With Most Water
- Leetcode: Container With Most Water
- 【LeetCode】Container With Most Water
- Leetcode: Container With Most Water
- LeetCode:Container With Most Water
- 骑士斗恶龙
- Robotium针对只有apk包的测试入门例子
- ubuntu 启动流程
- apache ab 压力测试
- 磁盘快照技术
- Leetcode Container with Most Water
- Delphi Idhttp的get和post方法
- 二分查找小结
- iphone应用程序生命周期
- CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)
- centos 下单独编译mysql.so模块
- 判断 2个 平行于坐标系轴的正方形是否有重叠
- hdu4405——Aeroplane chess
- Linux常用系统信息查看命令