Return the longest prefix (the beginning of a string) that all the words in words start with. If they share none, or the list is empty, return "".
Example 1
Input:
longest_common_prefix(['flower', 'flow', 'flight'])
Output:
'fl'
Example 2
Input:
longest_common_prefix(['dog', 'car'])
Output:
''
0 <= len(words) <= 10**40 <= len(word) <= 100No results yet
Run your code to check it against the examples, or submit to run every test.