The minimal free resolution of a class of square-free monomial ideals