摘要:
自己写的,冒泡排序,时间爆炸 class Solution: def moveZeroes(self, nums) -> None: """ Do not return anything, modify nums in-place instead. """ n=len(nums) for i in 阅读全文
摘要:
三个简单函数: class Solution: def addDigits(self, num: int) -> int: # 如果数字已经是个位数,则直接返回 if num <= 9: return num # 持续执行直到数字变成个位数为止 while True: # 将数字转换为其各个数字构成 阅读全文