AI InterviewSearch…Search problems, topics, or pages…Ctrl KGet started
Mediumcombinations

~60s

Counting the guests

At a party every guest shakes hands with every other exactly once, making 45 handshakes. How many guests were there?

Show the answer and the worked solution

Correct answer: B.

10

Worked solution

  1. n(n − 1)/2 = 45 → n(n − 1) = 90.
  2. 10 × 9 = 90, so n = 10.

Answer: 10.

The idea

Handshakes, matches in a round robin and diagonals of a polygon are all C(n,2). Solve n(n − 1) = 2k by spotting consecutive factors.

Shortcut. Back-substitute with n(n − 1)/2: 10 gives 10 × 9 ÷ 2 = 45 exactly, while 9 gives 36 and 11 gives 55.

Common trap. "9" — spotting 9 × 10 = 90 and taking the smaller factor; with n guests each shakes n − 1 hands, so n is the larger factor, 10.

Counting the guests — Aptitude Question

Counting the guests: At a party every guest shakes hands with every other exactly once, making 45 handshakes. Answer and worked solution on CodeKairo.

Question

At a party every guest shakes hands with every other exactly once, making 45 handshakes. How many guests were there?

Options

  1. 9
  2. 10
  3. 11
  4. 12
Show the answer and the worked solution

Correct answer: B. 10

Worked solution

  1. n(n − 1)/2 = 45 → n(n − 1) = 90.
  2. 10 × 9 = 90, so n = 10.

Answer: 10.

The idea

Handshakes, matches in a round robin and diagonals of a polygon are all C(n,2). Solve n(n − 1) = 2k by spotting consecutive factors.

Shortcut. Back-substitute with n(n − 1)/2: 10 gives 10 × 9 ÷ 2 = 45 exactly, while 9 gives 36 and 11 gives 55.

Common trap. "9" — spotting 9 × 10 = 90 and taking the smaller factor; with n guests each shakes n − 1 hands, so n is the larger factor, 10.

All Permutations & Combinations questions · placement mock tests