python3 DP O(N*numCarpets) solution got a TLE. Is this intended?
My solution is given as\n\nclass Solution:\n    def minimumWhiteTiles(self, floor: str, numCarpets: int, carpetLen: int) -> int:\n        dp = dict() # i, num_c
My solution is given as\n```\nclass Solution:\n    def minimumWhiteTiles(self, floor: str, numCarpets: int, carpetLen: int) -> int:\n        dp = dict() # i, num_carpets remaining -> num white\n        n = len(floor)\n        for i in range(n+1)[::-1]:\n            for j in range(numCarpets+1):\n                if i == n:\n                    dp[(i,j)] = 0\n                    continue\n                \n                if floor[i] == \'0\':\n                    dp[(i,j)] = dp[(i+1,j)]\n                else:\n                    dp[(i,j)] = 1+dp[(i+1,j)] \n                    if j > 0:\n                        dp[(i,j)] = min(dp[(i,j)], dp[(min(i+carpetLen, n),j-1)])\n        \n        return dp[(0, numCarpets)]\n```\nShould I make it more faster? \nIs this intended?
[]