input: def build_dictionary(samples: List[str]) -> Dict[str, str]:
      """ Create a dictionary from a list of string samples where each sample is in the 
      format "key->value". The function should return a dictionary where keys are mapped to their corresponding values.
      >>> build_dictionary(["apple->red", "banana->yellow", "cherry->red"])
      {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
      """
output:     result = {}
      for sample in samples:
          key, value = sample.split("->")
          result[key] = value
      return result