Intuit Interview Question
Software Engineer InternsCountry: United States
Interview Type: Written Test
The stable marriage problem has been stated as follows:
Given n men and n women, where each person has ranked all members of the opposite sex in order of preference, marry the men and women together such that there are no two people of opposite sex who would both rather have each other than their current partners. When there are no such pairs of people, the set of marriages is deemed stable.
Question is not fully clear. What is "stable marriage problem" ? Can you elaborate what exactly we need to match and how did you come up with the answer.
- Kaushik Lele February 07, 2016