LeetCode: 14. Longest Common Prefix
14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
解题要点
- 注意题中要求的是前缀
code
1 | class Solution { |
Write a function to find the longest common prefix string amongst an array of strings.
1 | class Solution { |