10. Longest Common Prefix
Write a function that finds the longest common prefix among an array of strings.
Example 1:
Input: strs = ["flower","flow","flight"] Output: fl
Example 2:
Input: strs = ["dog","racecar","car"] Output:
Constraints:
1 <= strs.length <= 200