input: Write a function to build a dictionary from string to string of the given samples. If the given input is empty, return an empty dictionary.
  
  def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary
  
  samples = ["apple->red", "banana->yellow", "cherry->red"]
  assert build_dictionary(samples) == {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
  samples_empty = []
  assert build_dictionary(samples_empty) == {}
output: def build_dictionary(samples):
      dictionary = {}
      if not samples:
          return dictionary
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary