Easy
You are given an array prices where prices[i] is the price of a stock on day i. Maximize profit by choosing one day to buy and a later day to sell. Return the max profit, or 0 if none.
Input: prices = [7,1,5,3,6,4] Output: 5 Explanation: Buy at 1, sell at 6.
Input: prices = [7,6,4,3,1] Output: 0