input: Write a python function to find the maximum profit from a list of stock prices.
  assert maxProfit([7, 1, 5, 3, 6, 4]) == 5
  assert maxProfit([7, 6, 4, 3, 1]) == 0
  assert maxProfit([3, 3, 5, 0, 0, 3, 1, 4]) == 4
output: def maxProfit(prices):
      if not prices:
          return 0
      
      min_price = float('inf')
      max_profit = 0
      
      for price in prices:
          if price < min_price:
              min_price = price
          elif price - min_price > max_profit:
              max_profit = price - min_price
              
      return max_profit