Items have weights; two suitcases have capacities. Each item goes in at most one suitcase — how much weight can you pack in total?
Items have weights; two suitcases have capacities. Each item goes in at most one suitcase — how much weight can you pack in total?
Unlock the full question, the code runner with test cases, and reference solution
One-time unlock. Yours forever.
Or get a for every question, unlimited code runs and AI mock interviews.
Opens with the full question.