leetcode
121. Best Time to Buy and Sell Stock
Solution code
Time complexity: O(n)
Space complexity: O(1)