Confluent coding round

can somebody help how to solve this problem?

// You are building an App that lets the users determine the most cost-effective order that they can place in a restaurant for the food items that they want to have. You have the menu of the restaurant that contains item name, and it's price. The restaurant can also offer Value Meals, which are groups of several items, at a discounted price. Write a program that accepts a list of menu items, and a list of items that the user wants to eat, and outputs the best price at which they can get all of their desired items.
// [Constraint: The user can order a maximum of 3 unique items.]

input

[5.00, "pizza"],
[8.00, "sandwich, coke"],
[4.00, "pasta"],
[2.00, "coke"],
[6.00, "pasta, coke, pizza"],
[8.00, "burger, coke, pizza"],
[5.00, "sandwich"]

user_wants: ["burger", "pasta"]

output

12

Comments (15)