✅DP || python
\n# Code\npython3 []\nclass Solution:\n\n    def check(self,s,dp,i,j,n,k,l):\n        if(i>=n):return 0\n        if(dp[i][j]!=-1):return dp[i][j]\n        if(s[
\n# Code\n```python3 []\nclass Solution:\n\n    def check(self,s,dp,i,j,n,k,l):\n        if(i>=n):return 0\n        if(dp[i][j]!=-1):return dp[i][j]\n        if(s[i]==\'0\'):\n            dp[i][j]=self.check(s,dp,i+1,j,n,k,l)\n            return dp[i][j]\n        dp[i][j]=1+self.check(s,dp,i+1,j,n,k,l)\n        if(j<k):dp[i][j]=min(dp[i][j],self.check(s,dp,i+l,j+1,n,k,l))\n        return dp[i][j]\n\n\n    def minimumWhiteTiles(self, floor: str, numCarpets: int, carpetLen: int) -> int:\n        n=len(floor)\n        dp=[[-1 for i in range(numCarpets+1)] for j in range(n)]\n        return self.check(floor,dp,0,0,n,numCarpets,carpetLen)\n```
['String', 'Dynamic Programming', 'Prefix Sum', 'Python3']