We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfc0894 commit a99f76aCopy full SHA for a99f76a
1 file changed
Python/longest-common-prefix.py
@@ -14,7 +14,7 @@ def longestCommonPrefix(self, strs):
14
return ""
15
16
for i in xrange(len(strs[0])):
17
- for string in strs:
+ for string in strs[1:]:
18
if i >= len(string) or string[i] != strs[0][i]:
19
return strs[0][:i]
20
return strs[0]
0 commit comments