Given an array of binary strings and two integers m and n, return the size of the largest subset of strings that contains at most m zeroes and n ones. This is a standard 0/1 knapsack problem with two resource constraints.
strs = array of binary strings, m = zero budget, n = one budget
maximum size of a subset within the zero/one budgets
Example 1:
Input:
strs = ["10","0001","111001","1","0"] m = 5 n = 3
Output:
4
Explanation:
A largest valid subset has size 4.
Example 2:
Input:
strs = ["10","0","1"] m = 1 n = 1
Output:
2
Explanation:
Choose "10" with either "0" or "1".