- Source : Link
- Author : Han
- Date : 2022-01-24
Problems
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty stringĀ "".
Example 1:
1 | |
Example 2:
1 | |
Solution
1 | |
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty stringĀ "".
Example 1:
1 | |
Example 2:
1 | |
1 | |