摘要: 题目描述: 方法一:数学 O(1) O(1) class Solution: def integerBreak(self, n: int) -> int: if n <= 3: return n - 1 a, b = n // 3, n % 3 if b == 0: return int(math. 阅读全文
posted @ 2020-08-01 09:27 oldby 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 方法:后序遍历 # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left 阅读全文
posted @ 2020-08-01 09:15 oldby 阅读(258) 评论(0) 推荐(0) 编辑