There are n different items available in the LeetCode Store, and each item has an individual price.
Besides purchasing items individually, there are several special offers. Each special offer contains a combination of one or more different items at a discounted price.
You are given:
Your task is to find the minimum cost required to purchase exactly the items specified in needs.
Rules:
Return the minimum amount of money needed to satisfy all the requirements.