implemented the minimum coin set problem