input: Write a python function to find the longest common prefix in a list of strings.
  assert longestCommonPrefix(['class', 'classes', 'classical'])=='class'
  assert longestCommonPrefix(['interview', 'integrate', 'internal'])=='int'
  assert longestCommonPrefix(['apple', 'banana', 'cherry'])==''
output: def longestCommonPrefix(strs):
      if not strs:
          return ""
      
      shortest = min(strs, key=len)
      
      for i, char in enumerate(shortest):
          for other in strs:
              if other[i] != char:
                  return shortest[:i]
      
      return shortest