Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2742. Painting the Walls
Pick a subset of walls for the paid painter to minimize total cost such that his total working time allows the free painter (who paints any wall in 1 time unit but only while the paid painter is busy) to finish the remaining walls. Equivalently, it's a 0/1 knapsack/DP: choosing wall i contributes weight time[i]+1 and you need total weight ≥ n at minimum cost.
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.