上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: #-*- coding: UTF-8 -*- class Solution(object): def isPowerOfFour(self, num): """ :type num: int :rtype: bool """ if num<=0:return False while True: if 阅读全文
posted @ 2016-10-12 17:08 火金队长 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*- class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ for i in r 阅读全文
posted @ 2016-10-12 17:07 火金队长 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*- class Solution(object): def isPowerOfThree(self, n): if n<=0: return False while True: if n==3 or n==1: return True tuple=divmo 阅读全文
posted @ 2016-10-12 17:07 火金队长 阅读(148) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def isUgly(self, num): if num<=0:return False comlist=[2,3,5];modflag=0 while True: if num==1:break for value in comlist: tupl 阅读全文
posted @ 2016-10-12 17:05 火金队长 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*-class Solution(object): def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if len(nums)<=1:return len(n 阅读全文
posted @ 2016-10-12 17:05 火金队长 阅读(221) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*- # Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solu 阅读全文
posted @ 2016-10-12 17:03 火金队长 阅读(120) 评论(0) 推荐(0) 编辑
摘要: class Solution(object): def isAnagram(self, s, t): if sorted(list(s.lower()))==sorted(list(t.lower())): return True return Falsesol=Solution()print so 阅读全文
posted @ 2016-10-12 17:03 火金队长 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*- # Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solu 阅读全文
posted @ 2016-10-12 17:02 火金队长 阅读(154) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*-#双栈法class Queue(object): def __init__(self): """ initialize your data structure here. """ self.inStack=[] self.outStack=[] def p 阅读全文
posted @ 2016-10-12 17:01 火金队长 阅读(200) 评论(0) 推荐(0) 编辑
摘要: #-*- coding: UTF-8 -*- # Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.rig 阅读全文
posted @ 2016-10-12 17:01 火金队长 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页