-
Test case 1:
Lets say we have enum
Color
{
Red,Blue,Green
}
Input : {{Red,1},{Red,1},{Red,1},{Red,1},{Blue,1},{Blue,1},{Blue,1},{Blue,1},{Green,1},{Green,1},{Green,1},{Green,1}}
So we have this configuration,
Red Cards : 4 {1,1,1,1}
Blue Cards : 4 {2,2,2,2}
Green Cards : 4 {4,4,4,4}
-
Output : False (We cannot divide the cards into 4 parts with the validation conditions).
-
Test case 2:
Input : {{Red,1},{Red,1},{Red,1},{Red,2},{Red,2},{Red,2},{Blue,1},{Blue,2},{Blue,3},{Green,5},{Green,5},{Green,5}}
Red Cards : 6 {1,1,1,2,2,2}
Blue Cards : 3 {1,2,3}
Green Cards : 3 {5,5,5}
-
Output : True (We can divide the cards into 4 parts with the validation conditions).
-
One of the way to divide the cards is:
[1,1,1] | [2,2,2] | [1,2,3] | [5,5,5]