input: Write a function to compute the optimal order of operations based on their time.
  assert compute_optimal_order({'A': 10, 'B': 5, 'C': 15, 'D': 20}) == [('B', 0), ('A', 5), ('C', 15), ('D', 30)]
  assert compute_optimal_order({'X': 50, 'Y': 10, 'Z': 5}) == [('Z', 0), ('Y', 5), ('X', 15)]
  assert compute_optimal_order({'P': 7, 'Q': 1, 'R': 3, 'S': 2}) == [('Q', 0), ('S', 1), ('R', 3), ('P', 6)]
output: def compute_optimal_order(operations):
      sorted_ops = sorted(operations.items(), key=lambda x: x[1])
      result = []
      current_time = 0
      for op, time in sorted_ops:
          result.append((op, current_time))
          current_time += time
      return result