NeetCode #750LC-2742Hard2-D Dynamic Programming
← Back to All Problems#750 · #2742 · Painting the Walls(给墙壁刷油漆)
📌 Problem Statement & Constraints
You must paint
n walls. A paid painter paints wall i in time[i] units and charges cost[i]; while the paid painter is busy, a free painter paints any wall in one time unit at no cost. Return the minimum cost to paint every wall. Constraints: 1 <= n <= 500, 1 <= cost[i] <= 10^6, 1 <= time[i] <= 500.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!