> 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: Input: [1,8,6,2,5,4,8,3,7] Output: 49 Reposted to [my blog: XXX](https://helloacm.com/coding-exercise-container-with-most-water-recursion/) for better indexing. ## Support me and my work as a witness - [witness thread](https://steemit.com/witness-category/@justyy/justyy-just-another-witness) by 1. voting me [here](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy), or 2. voting me as [a proxy](https://v2.steemconnect.com/sign/account-witness-proxy?proxy=justyy&approve=1). Thank you! **Some of My Contributions: [SteemIt Tutorials, Robots, Tools and APIs](https://helloacm.com/tools/steemit/)** ------------------------------------------------ XXX原文: [https://justyy.com/archives/6431](https://justyy.com/archives/6431) ## 支持我的工作 支持我成为 [见证人](https://steemit.com/cn/@justyy/5h6gyv-cn) 1. [请在 这里 投我一票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy), 或者 2. 设置我 [为代理](https://v2.steemconnect.com/sign/account-witness-proxy?proxy=justyy&approve=1). 谢谢您! 我的贡献:[SteemIt 工具、API接口、机器人和教程](https://helloacm.com/tools/steemit-tools/) ## 股东工具 1. 成为股东:[代理5 SP 即可 (退出股东 输入 0即可)](https://helloacm.com/tools/steemit/delegate-form/?delegatee=justyy) 2. [查询当前股东](https://helloacm.com/tools/steemit/list-of-delegators/?id=justyy) 请注意:每次代理都是以最后一次输入的SP数量为标准,比如已经代理10 SP,想多代理5 SP则需要输入 最后的数字 15 SP(而不是 5!)
author | justyy |
---|---|
permlink | coding-exercise-container-with-most-water-recursion |
category | programming |
json_metadata | {"community":"busy","app":"steemit/0.1","format":"markdown","tags":["programming","coding-exercise","cn-programming","busy","coding"],"links":["https://helloacm.com/coding-exercise-container-with-most-water-recursion/","https://steemit.com/witness-category/@justyy/justyy-just-another-witness","https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy","https://v2.steemconnect.com/sign/account-witness-proxy?proxy=justyy&approve=1","https://helloacm.com/tools/steemit/","https://justyy.com/archives/6431","https://steemit.com/cn/@justyy/5h6gyv-cn","https://helloacm.com/tools/steemit-tools/","https://helloacm.com/tools/steemit/delegate-form/?delegatee=justyy","https://helloacm.com/tools/steemit/list-of-delegators/?id=justyy"],"image":["https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg"]} |
created | 2018-07-25 18:57:48 |
last_update | 2018-11-15 20:04:30 |
depth | 0 |
children | 1 |
last_payout | 2018-08-01 18:57:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 4.826 HBD |
curator_payout_value | 0.719 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,964 |
author_reputation | 280,616,224,641,976 |
root_title | "Coding Exercise - Container With Most Water (Recursion) 编程练习题 - 最多水容器 (递归)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 65,961,900 |
net_rshares | 2,734,685,012,962 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ace108 | 0 | 254,900,971,232 | 17% | ||
magicmonk | 0 | 112,584,359,266 | 50% | ||
justyy | 0 | 1,300,416,432,944 | 85% | ||
luneknight | 0 | 373,726,807 | 100% | ||
busy.pay | 0 | 494,562,778,675 | 5.59% | ||
happyukgo | 0 | 1,697,924,885 | 85% | ||
nokeh | 0 | 251,977,581 | 99% | ||
elizacheng | 0 | 4,860,224,624 | 21% | ||
frankintaiwan | 0 | 80,143,710 | 20% | ||
helo | 0 | 2,226,444,962 | 10% | ||
goofyu | 0 | 13,028,403,644 | 60% | ||
shenchensucc | 0 | 915,878,540 | 20% | ||
czechglobalhosts | 0 | 192,410,239,091 | 2% | ||
victorialuxx | 0 | 340,338,277 | 100% | ||
susanli3769 | 0 | 82,879,425,801 | 62% | ||
doraemon | 0 | 309,077,000 | 100% | ||
robinlee | 0 | 381,787,572 | 87.33% | ||
sandan | 0 | 3,768,844,211 | 100% | ||
rainyapril | 0 | 587,707,925 | 99% | ||
al2ping | 0 | 103,997,925 | 99% | ||
oldman28 | 0 | 11,144,186,550 | 51% | ||
yasu24 | 0 | 6,071,404,756 | 20% | ||
jiangchen | 0 | 122,222,685 | 1% | ||
kangnajiang | 0 | 240,509,984 | 99% | ||
kikima | 0 | 427,033,885 | 99% | ||
geass | 0 | 681,459,920 | 99% | ||
moonvoid | 0 | 610,390,398 | 100% | ||
fremy | 0 | 2,171,910,157 | 100% | ||
xuran | 0 | 5,075,463,584 | 100% | ||
awiwea1974 | 0 | 275,747,086 | 100% | ||
superbing | 0 | 11,944,597,305 | 85% | ||
dailyfortune | 0 | 302,358,360 | 95% | ||
dailystats | 0 | 22,468,584,569 | 85% | ||
ayman101 | 0 | 314,713,331 | 100% | ||
vandadream | 0 | 22,455,324,326 | 100% | ||
steemline | 0 | 230,619,265 | 100% | ||
winniex | 0 | 5,056,923,966 | 10% | ||
jianan | 0 | 824,744,351 | 85.86% | ||
nada101 | 0 | 375,790,123 | 100% | ||
windowglass | 0 | 17,287,093,064 | 50% | ||
cnbuddy | 0 | 4,242,729,679 | 0.1% | ||
nileelily | 0 | 3,756,649,598 | 100% | ||
chann | 0 | 4,815,884,991 | 20% | ||
daxiang | 0 | 262,863,998 | 99% | ||
anxin | 0 | 2,097,577,700 | 86.63% | ||
stabilowl | 0 | 64,436,529,786 | 54% | ||
coindzs | 0 | 170,263,072 | 100% | ||
cryptonewsly | 0 | 222,347,635 | 100% | ||
moobear | 0 | 241,389,684 | 99% | ||
madokami | 0 | 105,411,071 | 99% | ||
magpielover | 0 | 136,395,958 | 100% | ||
nean | 0 | 586,547,545 | 99% | ||
foodielifestyle | 0 | 886,414,283 | 87.86% | ||
woolfe19861008 | 0 | 1,829,599,844 | 87.84% | ||
dailychina | 0 | 15,267,039,049 | 85% | ||
vincenthan | 0 | 585,112,681 | 99% | ||
yuxuan | 0 | 281,647,947 | 99% | ||
dongfengman | 0 | 8,512,099,209 | 86.28% | ||
historylover | 0 | 643,100,288 | 100% | ||
serenazz | 0 | 914,888,604 | 87.06% | ||
yedda | 0 | 584,892,952 | 99% | ||
shentrading | 0 | 505,782,125 | 73.89% | ||
zasilla | 0 | 587,464,371 | 99% | ||
aaronstar | 0 | 58,210,360 | 99% | ||
ayanamoon | 0 | 52,034,260 | 99% | ||
ethanlee | 0 | 7,293,254,522 | 68.31% | ||
twinsnicole | 0 | 586,189,032 | 99% | ||
deepthinking | 0 | 583,978,220 | 99% | ||
fanso | 0 | 965,107,371 | 78.19% | ||
lilypang22 | 0 | 2,740,398,205 | 62.54% | ||
zens | 0 | 584,902,837 | 99% | ||
steemitvip | 0 | 585,673,637 | 99% | ||
regals | 0 | 587,440,069 | 99% | ||
liuzg | 0 | 56,641,237 | 20% | ||
joelone | 0 | 586,353,306 | 99% | ||
sweet-jenny8 | 0 | 16,359,102,726 | 86.76% | ||
alex20050503 | 0 | 0 | 100% | ||
borndead04 | 0 | 0 | 100% | ||
devidkoperfild | 0 | 0 | 100% | ||
jemissongordon | 0 | 0 | 100% | ||
lordofreward | 0 | 207,507,120 | 0.75% | ||
rsmartt777 | 0 | 109,925,089 | 90% | ||
jheriko | 0 | 0 | 100% | ||
sauranbek | 0 | 0 | 100% | ||
bambugrove | 0 | 161,942,063 | 30% | ||
hoovesreport | 0 | 0 | 100% | ||
laiyuehta | 0 | 409,134,574 | 82.13% | ||
turtlegraphics | 0 | 8,355,853,538 | 85% | ||
dividehints | 0 | 0 | 100% | ||
bookshydration | 0 | 0 | 100% | ||
cappedscramble | 0 | 0 | 100% | ||
riemannevening | 0 | 0 | 100% | ||
beforeskate | 0 | 0 | 100% | ||
ecotypedatabase | 0 | 0 | 100% | ||
mockingexposure | 0 | 0 | 100% | ||
bucksumpaypal | 0 | 0 | 100% | ||
beerlimey | 0 | 0 | 100% | ||
maskoil | 0 | 0 | 100% | ||
fieldsonce | 0 | 0 | 100% | ||
sodgelatin | 0 | 0 | 100% | ||
dogpulled | 0 | 0 | 100% | ||
imaginaryclap | 0 | 0 | 100% | ||
statusrespond | 0 | 0 | 100% | ||
obnoxiousurine | 0 | 0 | 100% | ||
witnesstools | 0 | 7,966,970,389 | 85% | ||
aljager78 | 0 | 0 | 100% | ||
alitvinenko | 0 | 0 | 100% | ||
sernikolaev | 0 | 0 | 100% | ||
garrisaymon | 0 | 0 | 100% | ||
rdzhervis | 0 | 0 | 100% | ||
dzhonmey | 0 | 0 | 100% | ||
bridzhesc | 0 | 0 | 100% | ||
devidrays | 0 | 0 | 100% | ||
maksimle | 0 | 0 | 100% | ||
nikolayskvortsov | 0 | 0 | 100% | ||
bolendik | 0 | 0 | 100% | ||
stas.borenko | 0 | 0 | 100% | ||
anakimov1986 | 0 | 0 | 100% | ||
igor.gorshkov | 0 | 0 | 100% | ||
antonturov90 | 0 | 0 | 100% | ||
officialex | 0 | 0 | 100% | ||
ilovecoding | 0 | 0 | 10% | ||
quallingskipping | 0 | 0 | 100% | ||
quickestpeeler | 0 | 0 | 100% | ||
jappinesswrench | 0 | 0 | 100% | ||
shaftsboal | 0 | 0 | 100% | ||
wigeonpate | 0 | 0 | 100% | ||
jaguarqrcode | 0 | 0 | 100% | ||
tubingfeuille | 0 | 0 | 100% | ||
woldsfiver | 0 | 0 | 100% | ||
helpsmendip | 0 | 0 | 100% | ||
besarabika | 0 | 0 | 100% | ||
anschat1984 | 0 | 0 | 100% | ||
leonid.bulgakov | 0 | 0 | 100% | ||
celestacrid | 0 | 0 | 100% | ||
caringirish | 0 | 0 | 100% | ||
smellbaryon | 0 | 0 | 100% | ||
coyotefizzle | 0 | 0 | 100% | ||
perfectduster | 0 | 0 | 100% | ||
medullapages | 0 | 0 | 100% | ||
headerrelate | 0 | 0 | 100% | ||
nickermemory | 0 | 0 | 100% | ||
ruffcheesy | 0 | 0 | 100% | ||
hiveclamorous | 0 | 0 | 100% | ||
corrosionacne | 0 | 0 | 100% | ||
internetherpes | 0 | 0 | 100% | ||
woundsattracted | 0 | 0 | 100% | ||
takingtruck | 0 | 0 | 100% | ||
muscatortoise | 0 | 0 | 100% | ||
sedimentagitated | 0 | 0 | 100% | ||
leveretwit | 0 | 0 | 100% | ||
fawningheavy | 0 | 0 | 100% | ||
sacofitcocomp | 0 | 0 | 100% | ||
rilityfonid | 0 | 0 | 100% |
Hello! Your post has been resteemed and upvoted by @ilovecoding because **we love coding**! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!  *Reply !stop to disable the comment. Thanks!*
author | ilovecoding |
---|---|
permlink | 20181115t200442056z |
category | programming |
json_metadata | {"tags":["ilovecoding"],"app":"ilovecoding"} |
created | 2018-11-15 20:04:42 |
last_update | 2018-11-15 20:04:42 |
depth | 1 |
children | 0 |
last_payout | 2018-11-22 20:04:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 323 |
author_reputation | 40,845,997,808 |
root_title | "Coding Exercise - Container With Most Water (Recursion) 编程练习题 - 最多水容器 (递归)" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 75,352,564 |
net_rshares | 382,813,849 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ilovecoding | 0 | 382,813,849 | 5% |