当前位置:网站首页>11. Container With Most Water
11. Container With Most Water
2022-08-03 16:39:00 【51CTO】
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.
The above vertical lines are represented by array [1,8,6,2,5,4,8,3,7]. In this case, the max area of water (blue section) the container can contain is 49.
Example:
Java
边栏推荐
- C专家编程 第2章 这不是Bug,而是语言特性 2.4 少做之过
- SwinIR实战:详细记录SwinIR的训练过程
- 请问下这个hologres维表是被缓存了么?怎么直接Finished了
- 生产环境如何删除表呢?只能在SQL脚本里执行 drop table 吗
- 机器人开发--Universal Scene Description(USD)
- Description of the functional scenario of "collective storage and general governance" in the data center
- smp,numa和mpp体系结构总结
- 【带你了解SDN和网络虚拟化】
- SwinIR combat: record the training process of SwinIR in detail
- 【翻译】关于扩容一个百万级别用户系统的六个课程
猜你喜欢
如何使用MATLAB绘制极坐标堆叠柱状图
Cookie和Session的关系
虹科分享 | 如何测试与验证复杂的FPGA设计(3)——硬件测试
Component communication - parent-child component communication
2年开发经验去面试,吊打面试官,即将面试的程序员这些笔记建议复习
node连接mongoose数据库流程
C专家编程 第1章 C:穿越时空的迷雾 1.10 “安静的改变”究竟有多少安静
To participate in sweepstakes, incoming new programmers magazine welfare!
如何设计大电流九线导电滑环
FinClip | July 2022 Product Highlights
随机推荐
leetcode SVM
MySQL窗口函数
Kubernetes 笔记 / 入门 / 生产环境 / 用部署工具安装 Kubernetes / 用 kubeadm 启动集群 / 安装 kubeadm
error:Illegal instruction (core dumped),离线下载安装这个other版本numpy
【There is no tracking information for the current branch. Please specify which branch you want to 】
高薪程序员&面试题精讲系列132之微服务之间如何进行通信?服务熔断是怎么回事?你熟悉Hystrix吗?
生产环境如何删除表呢?只能在SQL脚本里执行 drop table 吗
EasyExcel implements dynamic column parsing and table storage
How to analyze the weekly activity rate?
[Unity Getting Started Plan] Basic Concepts (8) - Tile Map TileMap 02
如何设计大电流九线导电滑环
SwinIR实战:如何使用SwinIR和预训练模型实现图片的超分
protobuf 反射使用总结
[Unity Getting Started Plan] Basic Concepts (7) - Input Manager & Input Class
C专家编程 第3章 分析C语言的声明 3.9 轻松一下---驱动物理实体的软件
C语言04、操作符
leetcode:189. 轮转数组
【目标检测】Focal Loss for Dense Object Detection
如何使用MATLAB绘制极坐标堆叠柱状图
FinClip | 2022 年 7 月产品大事记