import java.util.*; public class Solution { public int TreeDepth(TreeNode root) { if (root == null) return 0; return 1 + Math.max(TreeDepth(root.right), TreeDepth(root.left)); } }