Simplest Recursion Ever!! 💯
\nclass Solution:\n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n       \n        toppingCosts=[0]+toppingCosts
```\nclass Solution:\n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n       \n        toppingCosts=[0]+toppingCosts\n        toppingCosts+=toppingCosts\n        # as we can take atmost two same values\n        def f(top,tot,v,target):\n            if tot>=target or len(top)==0:\n                v.append(tot)\n            else:\n                if len(top)!=0:\n                    f(top[1:],tot+top[0],v,target)\n\t\t\t\t\t#taking the topping\n                    f(top[1:],tot,v,target)\n\t\t\t\t\t#skipping \n        v=[]\n        for i in baseCosts:\n            f(toppingCosts,i,v,target)\n        v=list(set(v))\n        v.sort()\n        \n        c=[]\n        for i in range(len(v)):\n            c.append(abs(target-v[i]))\n        return v[c.index(min(c))]\n        \n\n```
['Recursion', 'Python']