Return the max profit from buying once and selling later, or 0 if none is possible.
Example:
Input: prices = [7,1,5,3,6,4] Output: 5