Dinner Hand Shakes

A couple invites n - 1 other couples to dinner.
Once everyone arrives, each person shakes hands with everyone he doesn’t know.
Then, the host asks everyone how many hands they shook, and each person replies with a different number. Assuming that everyone knows his or her own spouse, how many hands did the hostess shake?

NOTE: It might seem that the question is incomplete or has certain data missing. We assure you that its not the case. The question has sufficient information for you to arrive at a solution.

Hints
  • Solution Approach
  • Complete Solution
4933 successful submissions.
Click here to jump start your coding interview preparation