摘要:
#用二分查找法class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ first = 0 last = 阅读全文
posted @ 2020-02-11 17:13
米开朗菠萝
阅读(102)
评论(0)
推荐(0)
摘要:
# 递归方法解决class Solution(object): def letterCombinations(self, digits): """ :type digits: str :rtype: List[str] """ d = {"2":"abc", "3":"def", "4":"ghi" 阅读全文
posted @ 2020-02-11 16:16
米开朗菠萝
阅读(88)
评论(0)
推荐(0)
摘要:
class Solution(object): def isValid(self, s): """ :type s: str :rtype: bool """ stack = [] #存放符号 d = {"]": "[", ")":"(", "}":"{"} “”“ 判断符号是否是结束符号,如果是, 阅读全文
posted @ 2020-02-11 13:53
米开朗菠萝
阅读(72)
评论(0)
推荐(0)