update 14
This commit is contained in:
		@@ -4,18 +4,17 @@
 | 
				
			|||||||
# only lowercase
 | 
					# only lowercase
 | 
				
			||||||
class Solution:
 | 
					class Solution:
 | 
				
			||||||
    def longestCommonPrefix(self, strs: list[str]) -> str:
 | 
					    def longestCommonPrefix(self, strs: list[str]) -> str:
 | 
				
			||||||
    returnString = ""
 | 
					        return_string = ""
 | 
				
			||||||
    index = 0
 | 
					        i = 0
 | 
				
			||||||
    while i < len(str[0]):
 | 
					        while i < len(strs[0]):
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
                for string in strs:
 | 
					                for string in strs:
 | 
				
			||||||
                if string[i] == strs[0][i]:
 | 
					                    if string[i] != strs[0][i]:
 | 
				
			||||||
                    i += 1
 | 
					 | 
				
			||||||
                    returnString += string[i]
 | 
					 | 
				
			||||||
                else:
 | 
					 | 
				
			||||||
                        break
 | 
					                        break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                i += 1
 | 
				
			||||||
 | 
					                return_string += strs[0][i]
 | 
				
			||||||
            except:
 | 
					            except:
 | 
				
			||||||
                break
 | 
					                break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return returnString
 | 
					        return return_string
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user