摘要:
题目描述: 自己的提交: class Solution: def maxScore(self, s: str) -> int: d = {"0":0,"1":0} for i in s: d[i] += 1 res = 0 l,r = {"0":0,"1":0},d for v,i in enume 阅读全文
摘要:
题目描述: 自己的提交:O(N) class Solution: def maxScore(self, cardPoints: List[int], k: int) -> int: copy1 = [0] + cardPoints[:] copy2 = [0] + cardPoints[::-1] 阅读全文
摘要:
题目描述: 方法一: class Solution: def findDiagonalOrder(self, nums: List[List[int]]) -> List[int]: a,s,m=[(0,0)],[nums[0][0]],len(nums) while a: b=[] for i,j 阅读全文