input: def max_revenue(prices):
      """Calculates the maximum revenue that can be obtained from a list of prices over multiple consecutive days.
      The function uses a difference array to compute potential revenue when you buy low and sell high.
      >>> max_revenue([10, 7, 5, 8, 11, 9])
      6
      """
output:     if not prices:
          return 0
  
      min_price = prices[0]
      max_profit = 0
  
      for price in prices:
          min_price = min(min_price, price)
          max_profit = max(max_profit, price - min_price)
  
      return max_profit