摘要: 1 class Solution: 2 def removeDuplicates(self, S: str) -> str: 3 l = [] 4 for i in range(len(S)): 5 s = S[i] 6 if len(l) == 0: 7 l.a... 阅读全文
posted @ 2019-05-19 13:54 Sempron2800+ 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1 import heapq 2 class Solution: 3 def lastStoneWeight(self, stones: 'List[int]') -> int: 4 heapq._heapify_max(stones) 5 #r = [heapq._heappop_max(stones) for _ in range(len(s... 阅读全文
posted @ 2019-05-19 13:41 Sempron2800+ 阅读(117) 评论(0) 推荐(0) 编辑