input: Write a function to create a dictionary from a list of string pairs where each pair consists of a key and a value separated by a "->" symbol. The function should split each string pair and populate the dictionary with the keys and values. If the list of samples is empty, the function should 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 = []
  assert build_dictionary(samples) == {}
output: def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary