diff --git a/100-200q/121 b/100-200q/121 new file mode 100644 index 0000000..c832b51 --- /dev/null +++ b/100-200q/121 @@ -0,0 +1,12 @@ +Best Time to Buy and Sell Stock +class Solution: + def maxProfit(self, prices: List[int]) -> int: + max_profit=0 + buy=float('Inf') + + for i in price: + if i max_profit: + max_profit=i-buy + print(max_profit)