InterviewDB
Question
Max Metal Value - Knapsack Variant with Metal Alloy Constraints
Onsite
Question Details
Problem You have a list of metal pieces, each with a weight and value. You can carry at most W kg. However, you must include at least one piece of each metal type in your selection (or none of that type at all - you cannot take a partial type). Return the maximum total value achievable without exceeding the weight limit. Example: Follow-ups How does adding the "all-or-nothing per type" constraint change standard 0/1 knapsack? What is the time complexity of your solution? How would you reconstruc…
Full Details
🔒
Unlock all C3 AI questions
Full insider details, leaked discussions, and candidate experiences.
or every company, $100/year →About This Question
This is a reported interview question from a c3 ai interview during the onsite round.
It covers the following topics: Coding, Onsite, Dynamic Programming .