input: Write a python function to find the longest common prefix among an array of strings.
  assert longestCommonPrefix(["programming", "prog", "prompt"]) == "pro"
  assert longestCommonPrefix(["flower", "flow", "flight"]) == "fl"
  assert longestCommonPrefix(["dog", "racecar", "car"]) == ""
  assert longestCommonPrefix(["interspecies", "interstellar", "interstate"]) == "inters"
output: def longestCommonPrefix(strs):
      if not strs:
          return ""
      
      prefix = strs[0]
      
      for string in strs[1:]:
          while string[:len(prefix)] != prefix:
              prefix = prefix[:-1]
              if not prefix:
                  return ""
      
      return prefix