added the solution for the minimal removal problem