Get Best Price

Problem Overview

  • Find the minimum total price to get all requested menu items using single items and discounted value meals.
  • Input: menu items with prices, value meal bundles with prices, and a desired item list; Output: best total price; Constraint: up to 3 unique items.
  • Real-world context: restaurant ordering app optimizing cost for a user’s meal.
  • From Confluent interviews; a coding interview problem and common interview question on bundle pricing.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: