You are given an array `prices` where `prices[i]` is the price of a given stock on day i. You want to maximize your profit by choosing a single day to buy and a different day to sell. Return the maximum profit. If no profit is possible, return 0.
prices = [7,1,5,3,6,4]5prices = [7,6,4,3,1]0