class Solution: def __init__(self): self.root = None def construct(self,order,root,i): if i==len(order): return None else: if self.root==None: self.root = TreeNode(order[i]) self.construct(order,self.root,i+1) else: if order[i]<root.val: if root.left…