The Airplane Seat Assignment Probability interview question is a famous probability brainteaser. There are passengers boarding an airplane with seats. The first passenger lost their ticket and picks a seat at random. Every subsequent passenger takes their assigned seat if it's available; otherwise, they pick an available seat at random. What is the probability that the -th passenger sits in their own assigned seat?
Google and quant-heavy firms ask this to see if a candidate can simplify a complex-looking problem. While it looks like it requires Dynamic Programming or heavy math, the solution reveals a deep insight into symmetry. It tests your ability to think through recursive states.
While it can be modeled with Dynamic Programming, the core pattern is Mathematical Induction or Symmetry.
If :
For larger , the logic holds because the process only ends when someone finally picks either seat 1 (allowing everyone else to sit correctly) or seat (preventing the last person from sitting correctly). Since seat 1 and seat are treated identically by anyone "displaced" from their seat, the chances of picking one over the other are equal.
If a probability question seems incredibly complex but the answer for and is the same, try to look for a symmetry argument. Many "random choice" problems in interviews boil down to a simple 50/50 or result.
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Soup Servings | Medium | Solve | |
| New 21 Game | Medium | Solve | |
| Construct the Longest New String | Medium | Solve | |
| Toss Strange Coins | Medium | Solve | |
| Divisor Game | Easy | Solve |