private boolean avlJudge(TreeNode root){
        if(root==null){
            return true;
        }
        int leftDepth=getDepthOfTree(root.right);
        int rightDepth=getDepthOfTree(root.left);
        if(Math.abs(leftDepth-rightDepth)>1){
            return false;
        }
        return avlJudge(root.right) && avlJudge(root.left);
    }