Ones and Zeroes
Medium
2D DP & Knapsack Variants
Given binary strings and two integers m and n, print the size of the largest subset of the strings that has at most m zeros and at most n ones in total.
Constraints
1 <= k <= 600 1 <= len(string) <= 100 0 <= m, n <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.