# Interview Questions

Ritambhara Technologies - Coding Interview Preparations > Interview Questions > Logic > Quantitative Aptitude > Handshakes question

# Handshakes question

- September 4, 2012
- Posted by: Kamal Rawat
- Category: Quantitative Aptitude

At a party, everyone shook hands with everybody else. There were 66 handshakes. How many people were there at the party?

**Solution:**

This is a simple permutation/combination question.

If there are n people in the party. Then, number of ways in which you can select two out of n people is

** = n(n-1) /2**

Note: If order is important (i.e AB is different from BA), then the number of ways will be n(n-1). But, in our question, order is not important – For two people there will only be 1 handshake irrespective of whether A shook hand with B or the other way round.

From the question: **n(n-1)/2 = 66**

=> n = 12.

Hence, there were 12 people in the party.

Enjoy the party 🙂

Sorry, The answer is 12 people. I used the wrong formula earlier.

The formula is n(n+1)/2. Therefore, the correct answer is 11 people.