上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页
摘要: #coding=utf-8# Definition for an interval.class Interval(object): def __init__(self, s=0, e=0): self.start = s self.end = edef compare1(x, y): if x.st 阅读全文
posted @ 2019-03-19 10:16 AceKo 阅读(136) 评论(0) 推荐(0)
摘要: class Solution(object): def isSubsequence(self, s, t): """ :type s: str :type t: str :rtype: bool """ if not s: return True if not t: return False sIn 阅读全文
posted @ 2019-03-19 10:13 AceKo 阅读(165) 评论(0) 推荐(0)
摘要: class Solution1(object): def topKFrequent(self, nums, k): """ :type nums: List[int] :type k: int :rtype: List[int] """ Dict = {} for i in range(len(nu 阅读全文
posted @ 2019-03-19 10:11 AceKo 阅读(401) 评论(0) 推荐(0)
摘要: # """# This is the interface that allows for creating nested lists.# You should not implement it, or speculate about its implementation# """# class Ne 阅读全文
posted @ 2019-03-19 10:10 AceKo 阅读(156) 评论(0) 推荐(0)
摘要: #coding=utf-8#点评:#递归思想加层次遍历,很经典的解题模板思想 20181220class Solution(object): def numSquares(self, n): """ :type n: int :rtype: int """ pair = (n,0) queue = 阅读全文
posted @ 2019-03-17 16:18 AceKo 阅读(195) 评论(0) 推荐(0)
摘要: # Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.right = Noneclass Solution 阅读全文
posted @ 2019-03-17 16:17 AceKo 阅读(87) 评论(0) 推荐(0)
摘要: class Solution(object): def evalRPN(self, tokens): """ :type tokens: List[str] :rtype: int """ stack = [] ops = ["+","-","*","/"] for i in tokens: if 阅读全文
posted @ 2019-03-17 16:16 AceKo 阅读(127) 评论(0) 推荐(0)
摘要: class Solution(object): def postorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ class Command(object): def __init__(self,co 阅读全文
posted @ 2019-03-17 16:15 AceKo 阅读(151) 评论(0) 推荐(0)
摘要: # Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.right = Noneclass Solution 阅读全文
posted @ 2019-03-17 16:14 AceKo 阅读(88) 评论(0) 推荐(0)
摘要: # Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.right = Noneclass Solution 阅读全文
posted @ 2019-03-17 16:10 AceKo 阅读(201) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页