input: Write a function to build a dictionary from string to string of the given samples. The function should take a list of strings, where each string contains a sample in the format "key->value". It should return a dictionary where the keys are the strings before the arrow and the values are the strings after the arrow. 
  
  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 = ["cat->meow", "dog->bark", "elephant->trumpet"]
  assert build_dictionary(samples) == {"cat": "meow", "dog": "bark", "elephant": "trumpet"}
  
  samples = []
  assert build_dictionary(samples) == {}
output: def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary