← All problemsSign in

2209. Minimum White Tiles After Covering With Carpets

LeetCodeStringDynamic ProgrammingPrefix SumOpen on judge ↗

You are given a 0-indexed binary string floor, which represents the colors of tiles on a floor: - floor[i] = '0' denotes that the ith tile of the floor is colored black. - On the other hand, floor[i] = '1' denotes that the ith tile of the floor is colored white. You are also given numCarpets and carpetLen. You have numCarpets black carpets, each of length carpetLen tiles. Cover the tiles with t

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start