Developer Choosing Problem asked at Morgan Stanley Pair Programming Round.

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2020-07-29Added By Anonymous
Source: Link
Company: Morgan Stanley
Role: unknown
Stage: Pair Programming Round
Year: unknown
Location: unknown

Original Experience:
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?
Comments