Maximizing the number of toys taken

Revision en1, by vaibnak7, 2019-08-04 16:48:00

I recently came across the following question.

Given a matrix representing which child likes which toy. matrix[i][j]=1 represents that child i likes toy j. One child can get only 1 toy and one toy can be assigned to only 1 child.Find maximum number of children who can get the toy they wished.

One approach i can think of is going through all possible ways of distributing the toys but it wont work if the constraints are high, what can be a better approach.

Tags #matrix

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vaibnak7 2019-08-04 16:48:00 500 Initial revision (published)