LeetCode解题报告:121. Best Time to Buy and Sell Stock
ProblemSayyouhaveanarrayforwhichtheithi^{th}ithelementisthepriceofagivenstockondayi.Ifyouwereonlypermittedtocompleteatmostonetransaction(i.e.,buyoneandselloneshareofthestock),designanalgorithmtofindth