controlc
BAN USER
Questions (2)
Comments (3)
Reputation 70
- 0of 0 votes
AnswersGiven an array of strings of 0s and 1s. X and Y are also given. Return the maximum number of elements in a subset of the array elements which will X number of zeroes and Y number of 1s when combined. For eg: if array[] = {"01", "10", "0", "110"} X=3, Y=2
- controlc in India
Answer should be 3 since first 3 strings when combined will give the required number of 0s and 1s.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
What if the given array is like {"01", "10", "110", "0"}? Does your solution still returns 3?
- controlc September 18, 2011