** Python - DP | Memoization solution **
\nclass Solution:\n    def minimumWhiteTiles(self, floor: str, numCarpets: int, carpetLen: int) -> int:\n        if numCarpets*carpetLen >= len(floor):\n       
```\nclass Solution:\n    def minimumWhiteTiles(self, floor: str, numCarpets: int, carpetLen: int) -> int:\n        if numCarpets*carpetLen >= len(floor):\n            return 0\n        l = list(map(int,list(floor)))\n        dp = [[-1]*(numCarpets+1) for j in range(len(l))]\n        \n        def rec(i,n):\n            nonlocal l\n            if n == 0 or i >= len(l):\n                return sum(l[i:])\n            if dp[i][n] != -1:\n                return dp[i][n]\n            dp[i][n] = min(rec(i+carpetLen,n-1),rec(i+1,n)+l[i])\n            return dp[i][n]\n        \n        return rec(0,numCarpets)\n```
['Memoization', 'Python']