input: Write a function to build a dictionary from string to string of the given samples. Each sample is a string in the format "key->value". The function should take a list of such samples as input and return a dictionary where each key maps to its corresponding value.
  def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary
  
  assert build_dictionary(["apple->red", "banana->yellow", "cherry->red"]) == {"apple": "red", "banana": "yellow", "cherry": "red"}
  assert build_dictionary(["cat->meow", "dog->bark"]) == {"cat": "meow", "dog": "bark"}
  assert build_dictionary(["car->sedan", "bike->sports"]) == {"car": "sedan", "bike": "sports"}
  assert build_dictionary(["laptop->thinkpad", "phone->iphone"]) == {"laptop": "thinkpad", "phone": "iphone"}
  assert build_dictionary([]) == {}
output: def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary