思路在注释里详细描述了。 class Solution: def Convert(self, pRootOfTree): #递归方法 root=pRootOfTree if not root: return if not root.left and not root.right: return root #递归得到已经有序的双向链表的左半部分 left_dlink_head=self.Convert(root.left) cur=left_dlink_head #左半部分的双向链表的表尾节点应当作为二叉排序树根节点的前一个节点,则要找到双向链表左半部分的表尾 #需要沿着左半部分的右子树的路径来...