摘要: 自己写的递归: class Solution: def __init__(self): self.res_list=list() def inorderTraversal(self, root) : if root: if root==None: return else: self.inorderT 阅读全文
posted @ 2024-02-03 17:31 Junior_bond 阅读(5) 评论(0) 推荐(0)
摘要: 二叉树 class Node(object): def __init__(self,val,lchild=None,rchild=None): self.val=val self.lchild=lchild self.rchild=rchild class Tree(object): def __i 阅读全文
posted @ 2024-02-03 16:57 Junior_bond 阅读(14) 评论(0) 推荐(0)