03 2020 档案
摘要:题目描述: 方法一:第一次提交:python暴力 O(N^2) class Solution: def lastRemaining(self, n: int, m: int) -> int: a = [i for i in range(n)] i = 0 while(len(a) > 1): i =
阅读全文
摘要:题目描述: python 回溯 +kmp next数组 class Solution: def findGoodStrings(self, n: int, s1: str, s2: str, evil: str) -> int: MOD = int(1e9 + 7) m = len(evil) or
阅读全文
摘要:题目描述: python提交: import collections class UndergroundSystem: def __init__(self): self.idloop = collections.defaultdict(list) self.count = collections.d
阅读全文
摘要:题目描述: python提交:O(N^3) class Solution: def numTeams(self, rating: List[int]) -> int: ans = 0 for i in range(len(rating)): for j in range(i,len(rating))
阅读全文
摘要:题目描述: python提交: from typing import List import collections class Solution: def findLucky(self, arr: List[int]) -> int: dic = collections.Counter(arr)
阅读全文
浙公网安备 33010602011771号