Given Two array with the preference of two developers say Ying and Ming, both need to create a team according to the preference, you need to return the String containing the Initial of the team the developers got selected it Note: Ying will always got the chance to make a first pick?
Example says Ying Preference table [1,2,3,4] and Ming Preference table is [1,2,3,4]
than the Output should be 'YMYM' 2nd Example Ying Preference input array [1,3,2]
and Ming Preference input array is [3,1,2] than the String return would be 'YYM'.How to solve it?