LeetCode刷题——Array篇(Best Time to Buy and Sell Stock)
Sayyouhaveanarrayforwhichtheithelementisthepriceofagivenstockondayi.Ifyouwereonlypermittedtocompleteatmostonetransaction(ie,buyoneandselloneshareofthestock),designanalgorithmtofindthemaximumprofit.Exa