leetcode_11. Container With Most Water ? 待解决
2017-11-26 18:39
253 查看
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (I, ai). n vertical lines are drawn such that the two endpoints of line I is at (I, ai) and (I, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
Note: You may not slant the container and n is at least 2.
提示:提交代码后,需要用简洁的语言解释一下代码思路~ 谢谢
历史题目和总结见公众号「每日一道算法题」
https://leetcode.com/problems/container-with-most-water/description/
思路:
Note: You may not slant the container and n is at least 2.
提示:提交代码后,需要用简洁的语言解释一下代码思路~ 谢谢
历史题目和总结见公众号「每日一道算法题」
https://leetcode.com/problems/container-with-most-water/description/
思路:
相关文章推荐
- Subsets II [leetcode] 从获取子集的递归和循环方法说起,解决重复子集的问题
- [LeetCode-20] Valid Parentheses(用栈解决配对问题)
- leetcode_303. Range Sum Query - Immutable ? 待解决
- 【LeetCode】3ms 解决 Pascal's Triangle
- leetcode_606. Construct String from Binary Tree ? 待解决
- 用java解决LeetCode(1)——Two Sum
- [LeetCode] 35. Search Insert Position 解决思路
- leetcode_464. Can I Win ? 待解决
- [leetcode]解决Symmetric Tree的一点小心得
- leetcode_645. Set Mismatch ? 待解决
- leetcode 326. Power of Three(C语言,一行代码解决,两种方法)24
- leetcode _581. Shortest Unsorted Continuous Subarray ? 待解决
- Leetcode:minimum_depth_of_binary_tree解决问题的方法
- 两种回溯方法解决子集问题的思路 leetcode 78. Subsets
- [leetcode]解决Clone Graph的一点小心得
- leetcode_330. Patching Array ? 待解决
- leetcode_623. Add One Row to Tree ? 待解决
- leetcode_40. Combination Sum II ? 待解决
- 利用BFS和DFS解决 LeetCode 130: Surrounded Regions
- leetcode_464. Can I Win ? 待解决