Available question text
Given an array of item weights and two bag capacity limits, assign each item to one of the two bags (or leave it out) to maximize the total packed weight without exceeding either capacity. The core challenge is a two-dimensional 0/1 knapsack problem—typically solved with DP over both capacities or by reducing to repeated single-knapsack solves.
Related questions
Continue with questions that share topics or the same question type.
- Maximum Bags With Full Capacity of Rocks
Coding
- Maximum Coins From K Consecutive Bags
Coding · Array · Binary Search · Greedy
- Maximum Energy Boost From Two Drinks
Coding
- Maximum Length Substring With Two Occurrences
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3647. Maximum Weight in Two Bags
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source