摘要: class Solution(object): def isValid(self, s): """ :type s: str :rtype: bool """ l=[] candidate=['(',')','{','}','[',']'] d={'(':')','{':'}'... 阅读全文
posted @ 2017-12-16 16:18 PirateLHX 阅读(131) 评论(0) 推荐(0)
摘要: class Solution(object): def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ if not strs: return "" for i,le... 阅读全文
posted @ 2017-12-16 15:00 PirateLHX 阅读(145) 评论(0) 推荐(0)
摘要: class Solution(object): def romanToInt(self, s): """ :type s: str :rtype: int """ d={"I":1,"V":5,"X":10,"L":50,"C":100,"D":500,"M":1000} sum=0 ... 阅读全文
posted @ 2017-12-16 14:15 PirateLHX 阅读(150) 评论(0) 推荐(0)