0/1 Knapsack || Pick Not pick || Easy to read concise code
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\nint n,l;\nint numCarpets;\nint dp[1000+1][1000+1];\n    int solve(string &floor, int ind, int rem){\n        if(ind>=n) return 0;\n        if(dp[ind][rem] != -1) return dp[ind][rem];\n\n        if(floor[ind]==\'1\'){\n           int pick=INT_MAX,not_pick=INT_MAX;\n\n            if(rem) pick=solve(floor,ind+l,rem-1);\n            not_pick=1+solve(floor,ind+1,rem);\n            return dp[ind][rem]=min(op1,op2);\n        }\n        return dp[ind][rem]=solve(floor,ind+1,rem);\n    }\n    int minimumWhiteTiles(string floor, int numCarpets, int carpetLen) {\n        n=floor.size(), l=carpetLen;\n        memset(dp,-1,sizeof(dp));\n        return solve(floor,0,numCarpets);\n    }\n};\n```
['Dynamic Programming', 'Memoization', 'C++']