摘要:
题目描述: 方法一: class Solution: def findMaximumXOR(self, nums: List[int]) -> int: root = TreeNode(-1) for num in nums: cur_node = root #当前的node for i in ra 阅读全文
摘要:
题目描述: 第一次提交: class Solution: def isIsomorphic(self, s: str, t: str) -> bool: dicA = {} dicB = {} for i in range(len(s)): if s[i] not in dicA: dicA[s[i 阅读全文
摘要:
第一次提交: class Solution: def isArmstrong(self, N: int) -> bool: n = N l = len(str(N)) res = 0 while N: a = N % 10 res += a**l N = N//10 if res == n: ret 阅读全文
摘要:
第一次提交: class Solution: def largestUniqueNumber(self, A: List[int]) -> int: dict = {} for i in A: if i not in dict: dict[i] = 1 else: dict[i] += 1 res 阅读全文