在CVS拿到的Snapple rebate form说必须要原始表格# PennySaver - 省钱一族
f*t
1 楼
Container With Most Water
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.
下面是run完我的function后的一个test case:
Showing the first failed test case.
input output expected
[1,2,4,3] 6 4
不太明白为什么expected应该是4?
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.
下面是run完我的function后的一个test case:
Showing the first failed test case.
input output expected
[1,2,4,3] 6 4
不太明白为什么expected应该是4?