Python easy to read and understand | backtracking
```\nclass Solution:\n    def solve(self, sums, topping, target, index):\n        res = abs(sums-target)\n        if res < self.diff:\n            #print(sums, 
```\nclass Solution:\n    def solve(self, sums, topping, target, index):\n        res = abs(sums-target)\n        if res < self.diff:\n            #print(sums, res)\n            self.diff = res\n            self.ans = sums\n        elif res == self.diff:\n            self.ans = min(self.ans, sums)\n        if index == len(topping):\n            return\n        for i in range(3):\n            sums += topping[index]*i\n            self.solve(sums, topping, target, index+1)\n            sums -= topping[index]*i\n    \n    def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:\n        self.ans, self.diff = float("inf"), float("inf")\n        for base in baseCosts:\n            self.solve(base, toppingCosts, target, 0)\n        return self.ans
['Backtracking', 'Python', 'Python3']