Simple JAVA backtracking solution
class Solution {\n    \n\tclosestCost = Integer.MAX_VALUE;\n    \n    public void closestCost(int[] toppingCosts, int currIdx, int currCost , int targetCost){\n
class Solution {\n    \n\tclosestCost = Integer.MAX_VALUE;\n    \n    public void closestCost(int[] toppingCosts, int currIdx, int currCost , int targetCost){\n        if(Math.abs(targetCost - currCost) < Math.abs(closestCost - targetCost))\n            closestCost = currCost;\n        \n        if(Math.abs(targetCost - currCost) == Math.abs(closestCost - targetCost))\n            closestCost = Math.min(closestCost , currCost);\n        \n        if(currCost < targetCost && currIdx < toppingCosts.length){\n            closestCost(toppingCosts, currIdx + 1, currCost, targetCost);\n            closestCost(toppingCosts, currIdx + 1, currCost + toppingCosts[currIdx], targetCost);\n            closestCost(toppingCosts, currIdx + 1, currCost + 2*toppingCosts[currIdx] , targetCost);\n        }\n    }\n    \n    public int closestCost(int[] baseCosts, int[] toppingCosts, int target) {\n        for(int baseCost : baseCosts)\n            closestCost(toppingCosts , 0 , baseCost , target);\n            \n        return closestCost;\n    }\n}
['Backtracking', 'Depth-First Search', 'Recursion', 'Java']