Search
⌘K

Leetcode 474. Ones and Zeroes

Select the largest subset of binary strings from strs such that the total number of 0's is ≤ m and total number of 1's is ≤ n. This is a 0/1 knapsack-style optimization with two resource constraints (zeros and ones), typically solved with 2D DP.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.