public int minDepth_helper(TreeNode root) {
        if (root == null)
            return Integer.MAX_VALUE;
        if (root.left == null && root.right == null)
            return 1;
        int left = minDepth_helper(root.left);
        int right = minDepth_helper(root.right);
        return Math.min(left, right) + 1;
    }