public static void maxDepthR(TreeNode root, int level) {
		if(root==null){
			maxlevel = 0;
			return;
		}else{
    		if (root.left != null ) {
    			level += 1;
    			if (level > maxlevel)
    				maxlevel = level;
    			maxDepthR(root.left, level);
    		}
    		if (root.right != null) {
    		    if(root.left==null)
    			    level += 1;
    			if (level > maxlevel)
    				maxlevel = level;
    			maxDepthR(root.right, level);
    		}
		}
		return;
	}