Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3647. Maximum Weight in Two Bags
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.