Buy and Resell Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1126 Accepted Submission(s): 359 P ...
分类:
其他好文 时间:
2018-08-26 16:41:04
阅读次数:
294
Sayyouhaveanarrayforwhichtheithelementisthepriceofagivenstockondayi.
Designanalgorithmtofindthemaximumprofit.Youmaycompleteatmosttwotransactions.
Note:
Youmaynotengageinmultipletransactionsatthesametime(ie,youmustsellthestockbeforeyoubuyagain).
Subscribeto..
分类:
编程语言 时间:
2017-03-27 19:59:25
阅读次数:
165