Participate in Codex, Test Your Skills & Win BIG

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.

  • Solution Approach
  • Complete Solution


Click here to start solving coding interview questions