Given a binary search tree and a new tree node, insert the node into the tree. You should keep the tree still be a valid binary search tree.
public class Solution {
public TreeNode insertNode(TreeNode root, TreeNode node) {
if (root == null) return node;
if (root.val > node.val) {
root.left = insertNode(root.left, node);
} else {
root.right = insertNode(root.right, node);
}
return root;
}
}