strs is a list of binary strings. Return the largest number of strings you can pick so that together they contain at most m zeros and at most n ones. Each string can be picked once.
For strs = ["10", "0001", "111001", "1", "0"], m = 5 and n = 3 the answer is 4.
Example 1
Input:
find_max_form(['10', '0001', '111001', '1', '0'], 5, 3)
Output:
4
Example 2
Input:
find_max_form(['10', '0', '1'], 1, 1)
Output:
2
0 <= len(strs) <= 2001 <= len(string) <= 200 <= m, n <= 60No results yet
Run your code to check it against the examples, or submit to run every test.