Python | BFS | 207ms | 4-line | fast and simple solution
\nclass Solution:\n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n        q = [target - basecost for basecost in
```\nclass Solution:\n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n        q = [target - basecost for basecost in baseCosts]\n\n        for toppingcost in toppingCosts:\n            q += [val - cost for val in q if val > 0 for cost in (toppingcost, toppingcost * 2)]\n\n        return target - min(q, key=lambda x: abs(x) * 2 - (x > 0))\n```
['Breadth-First Search', 'Python', 'Python3']