以下函数可以正确完成二叉搜索树的插入,并保持二叉搜索树性质。

class TreeNode:    def __init__(self, x):        self.val = x        self.left = None        self.right = None def insertNode(root, x):    if not root:        return TreeNode(x)     if x < root.val:        root.right = insertNode(root.right, x)    else:        root.left = insertNode(root.left, x)     return root
填写答案