class TreeNode: def init(self, x): self.val = x self.left = None self.right = None @param root TreeNode类 @return int整型二维数组 class Solution: def levelOrder(self , root ): # write code here # 根节点为空时 if root is None: return [] res = [] pt = [root] #pr用来存放pt的下一层子节点 pr = [] #若pt为空列表时,结束 while len(pt) !...