![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
De_CCC
这个作者很懒,什么都没留下…
展开
-
LeetCode 111二叉树最小深度
Leetcode 111 二叉树最小深度 class Tree(object): def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right def minDepth(root:Tree): if root == None: return 0 depth = 1 temp原创 2021-05-20 16:52:03 · 78 阅读 · 0 评论 -
Leetcode-三数之和
暴力解法: class Solution: def threeSum(self, nums): temp = {} res = [] print(nums) t_set = [] for i, num in enumerate(nums[:-2]): for j_num in nums[i+1:]: if j_nu...原创 2019-11-29 10:19:34 · 93 阅读 · 0 评论