:type strs: List[str] :rtype: str
(self, strs)
| 32 | """ |
| 33 | class Solution(object): |
| 34 | def longestCommonPrefix(self, strs): |
| 35 | """ |
| 36 | :type strs: List[str] |
| 37 | :rtype: str |
| 38 | """ |
| 39 | result = "" |
| 40 | |
| 41 | for i in zip(*strs): |
| 42 | a = i[0] |
| 43 | for j in i[1:]: |
| 44 | if j != a: |
| 45 | return result |
| 46 | else: |
| 47 | result += a |
| 48 | |
| 49 | return result |
| 50 |
nothing calls this directly
no outgoing calls
no test coverage detected