摘要:
简单的利用递归来做 # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class 阅读全文
摘要:
双指针 class Solution: def moveZeroes(self, nums: List[int]) -> None: """ Do not return anything, modify nums in-place instead. """ i = j = 0 while j < l 阅读全文
摘要:
注意python的字符和数字转化函数是chr和ord class Solution: def licenseKeyFormatting(self, S: str, K: int) -> str: lst = [] for c in S: if c == '-': continue if c >= ' 阅读全文