The Google Interview Question Everyone Gets Wrong — Veritasium

Quick Overview

Key Takeaway: The sum of handshakes at a party must always be an even number, making it impossible for the sum to be odd.

Key Points: Each handshake involves two people, adding 2 to the total sum of handshakes. The handshaking lemma states that the sum of degrees in any finite graph is an even number. The problem tests logical reasoning and basic graph theory, not complex math. The correct answer is that it's impossible for the sum to be odd.

Summary

The Google interview question asks if the sum of handshakes reported by N people at a party can be an odd number. The definitive answer is no, it is impossible for the sum to be odd. This is because every single handshake involves two individuals. When two people shake hands, each person's individual handshake count increases by one, meaning that the total sum of all reported handshakes increases by two for every single handshake that occurs.

This principle ensures that the total sum will always be an even number. This concept is a direct application of the handshaking lemma from graph theory, which states that the sum of the degrees of all vertices in any finite graph is always an even number, specifically twice the number of edges. The question serves as a test of logical reasoning and basic mathematical intuition, often leading candidates to overcomplicate a straightforward parity problem.

Key Points: The sum of handshakes will always be an even number because each handshake involves two participants. Every handshake adds exactly two to the total sum of reported handshakes (one for each person involved). This concept is formally known as the handshaking lemma in graph theory, where the sum of degrees (handshakes) in any graph is twice the number of edges (handshakes), thus always even. The question is designed to test logical reasoning and fundamental mathematical understanding rather than complex calculations. The common mistake is overthinking or failing to recognize the simple parity rule. It is definitively impossible for the sum of handshakes to be an odd number.

Raw markdown version of this recap