要点: 序列化成“根左根右”,利用根的位置区分开左右子树,这样反序列化的时候就非常方便 每个节点的值用()包裹,以防数值不止一位 # -*- coding:utf-8 -*- # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def Serialize(self, root): # write code here if n...