input: Write a function to build a dictionary from a list of string samples, where each sample is in the format "key->value". The function should return the dictionary created from the given samples.
  assert build_dictionary(["apple->red", "banana->yellow", "cherry->red"]) == {"apple": "red", "banana": "yellow", "cherry": "red"}
  assert build_dictionary(["dog->brown", "cat->black", "fish->silver"]) == {"dog": "brown", "cat": "black", "fish": "silver"}
  assert build_dictionary([]) == {}
output: def build_dictionary(samples):
      result = {}
      for sample in samples:
          key, value = sample.split('->')
          result[key] = value
      return result