再次提醒,不要给宠物乱用人类的药物~# pets - 心有所宠
m*a
1 楼
难道我理解不正确?难道中间更高的vertical line不block两边比较低的vertical
line 形成water container?
比如[1 2 1], 如果block结果是1,否则就是2。
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.
line 形成water container?
比如[1 2 1], 如果block结果是1,否则就是2。
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.