Skip to content

Container With Most Water #8

@barretlee

Description

@barretlee

本题难度:★★

给定 N 个非负整数 a1, a2, ..., an, 每个数对应坐标上的一个点 (i, ai),在坐标轴上将所有的 (i ,0) 和 (i, ai) 使用直线链接起来。

任何两条 相邻的 线 (包含 Y 轴) ,这两条线与 X 轴构成一个容器,找出容量最大的容器对应的线。

注意:不能够倾斜容器,并且 n 不小于 2。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions