public static int minDepthHelper(TreeNode root) {
        if(root == null){
        	return 0;
        }
    	if(root.left == null && root.right == null){
    		return 1;
    	}
        int leftMin = minDepthHelper(root.left)+1;
        int rightMin = minDepthHelper(root.right)+1;
        return leftMin<rightMin?leftMin:rightMin;
    }