摘要: 原题 1 class Solution: 2 def trailingZeroes(self, n: int) -> int: 3 ans,div = 0,5 4 while div <= n: 5 ans += n // div 6 div *= 5 7 return ans 阅读全文
posted @ 2021-02-09 22:26 凝视深空 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 原题 1 class MyQueue: 2 3 def __init__(self): 4 """ 5 Initialize your data structure here. 6 """ 7 self.mainstack = [] 8 self.helpstack = [] 9 10 def pu 阅读全文
posted @ 2021-02-09 16:45 凝视深空 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 原题 以下是我的代码,就是简单的字符串操作,可以ac但背离了题意,我之前没接触过Trie 1 class Trie: 2 3 def __init__(self): 4 """ 5 Initialize your data structure here. 6 """ 7 self.trie = se 阅读全文
posted @ 2021-02-09 12:36 凝视深空 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 原题 1 class Solution: 2 def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]: 3 dic1,dic2 = {},{} 4 def helper(nums,dic): 5 for n in nu 阅读全文
posted @ 2021-02-09 11:34 凝视深空 阅读(78) 评论(0) 推荐(0) 编辑