摘要:
from typing import List# 这道题我是用动态规划的方法来做的,# 时间复杂度是O(n~2)空间复杂度是O(n)。# 定义一个列表,其中用来存放当前数比前面几个数递增大。class Solution: def increasingTriplet(self, nums: List[ 阅读全文
posted @ 2020-08-05 20:56
月为暮
阅读(486)
评论(0)
推荐(0)
摘要:
# Definition for a binary tree node.class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Nonea = TreeNode(3)b = TreeNode( 阅读全文
posted @ 2020-08-05 12:57
月为暮
阅读(289)
评论(0)
推荐(0)

浙公网安备 33010602011771号