public static int treeDepth(TreeNode root) {
if (root == null){
return 0;
}
int leftDepth = treeDepth(root.left);
int rightDepth = treeDepth(root.right);
return Math.max(leftDepth, rightDepth) + 1;
}