leetcode-explore-learn-数据结构-二叉树3
本系列博文为leetcode-explore-learn子栏目学习笔记,如有不详之处,请参考leetcode官网:https://leetcode-cn.com/explore/learn/card/data-structure-binary-tree/2/traverse-a-tree/7/
所有例题的编程语言为python
二叉树节点结构:
class TreeNode(object):def __init__(self, x):self.val = xself.left = Noneself.right = None