【leetcode】第11题:Container问题
来源:互联网 发布:mac系统怎么更新不了 编辑:程序博客网 时间:2024/06/07 00:33
这题比较简单,自己就直接贴代码了
代码如下:
public static int container ( int[ ] a ) {int container = 0 ;for(int i = 0; i < a.length ; i++){for(int j =i+1; j< a.length; j++){if( a[ i ] > a[ j ] ){a [ i ] = a [ j ];}int thisContainer = (j-i) * a [ i ] ;if( thisContainer > container ){container = thisContainer;}}}return container;}
0 0
- 【leetcode】第11题:Container问题
- leetcode第11题——**Container With Most Water
- leetcode 第11题 Container With Most Water
- 【LeetCode】LeetCode——第11题:Container With Most Water
- (java)leetcode 第11题Container With Most Water(正确理解)
- leetcode题解||Container With Most Water问题
- Leetcode之Container With Most Water 问题
- 【小熊刷题】Container with Most Water <Leetcode 11, Java>
- 第65题 Container With Most Water
- LeetCode 11: Container With Most Water
- leetcode 11 Container With Most Water
- Leetcode【11】:Container With Most Water
- [leetcode 11] Container With Most Water
- [leetcode 11] Container With Most Water
- LeetCode | #11 Container With Most Water
- leetcode.11---------Container With Most Water
- [LeetCode 11]Container With Most Water
- leetcode 11 Container With Most Water
- 第三周项目4:穷举法解决组合问题(1)
- Leet Code OJ 1. Two Sum [Difficulty: Easy]
- 简单.STL
- Hadoop 完全分布式ssh免密码设置
- 自定义View事件拦截机制(自定义viewGroup和外部法解决滑动冲突)
- 【leetcode】第11题:Container问题
- mapreduce原理和执行过程
- iOS UIViewController的生命周期及iOS程序执行顺序
- MYSQL查询优化
- 用css写出横向导航栏
- 使用MIC进行变量选择
- 几何原本查询程序1.0
- Hdu---1010
- I'll play a trick on you