出现了'int' object has no attribute 'val'这个问题
收起
你二叉树的第一个节点是int类型的0(type(tree[0])=int),不是你自己定义的树节点。
type(tree[0])=int
报告相同问题?