Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
791 views
in Online Assessments by Expert (34,270 points) | 791 views

1 Answer

0 like 0 dislike
To accommodate N people in M rooms with k constraints such that two people can’t be in the same room.
Return true if can be accomodated in M rooms given the constraints.
N=3
M=2
k={1,2},{3,2} 1 & 2 cannot be in same room , 3 & 2 cannot be in same room
by Expert (34,270 points)