/*
获取二叉树的高度
时间复杂度:O(N)
*/
int getHeight(TreeNode root) {
if(root == null){
return 0;
}
int leftHeigh = getHeight(root.left);
int rightHeigh = getHeight(root.right);
int bigHeigh = (leftHeigh > rightHeigh) ? leftHeigh : rightHeigh;
return bigHeigh+1;
}