难度:简单 一、题目描述: 二、解题分析: 1、水平扫描 class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: if len(strs) == 0: return '' s = strs[0] for i in range(1, len(strs)): while strs[i].find(s) != 0 : s = s[:-1] return s 2、垂直扫描 class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: r