You are given an array prices where prices[i] is the price of a given stock on the ith day.
prices
prices[i]
You may complete at most one transaction: choose one day to buy the stock and a different later day to sell. Your goal is to maximise the profit.
If no profitable transaction is possible, return 0.
0
You are given an array `prices` where `prices[i]` is the price of a given stock on the *i*th day.