标签:code turn self efi long lis type 技术分享 class
题目如下:
Python代码:
def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ if not strs: return ‘‘ for i,letter_group in enumerate(zip(*strs)): if len(set(letter_group))>1: return strs[0][:i] else: return min(strs)
LeetCode(14)Longest Common Prefix
标签:code turn self efi long lis type 技术分享 class
原文地址:http://www.cnblogs.com/CQUTWH/p/7154448.html