class Solution {
public int maxDepth(TreeNode root) {
if(root == null) {
return 0;
}
int a = maxDepth(root.left) + 1;
int b = maxDepth(root.right) + 1;
return Math.max(a, b);
}
}

후위탐색 ㅇ