Well, the recursion approach is pretty simple:

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

I just cannot figure out the time complexity of this solution. Somebody says it's O(n). Aren't `maxDepth(root.left)`

and `maxDepth(root.right)`

computed simultaneously, which would make the time complexity O(lgn)? Thanks.