A quick combinatorics and probability puzzle

MediumConcept15 minRERSMLEPro outline

The question

You shuffle a deck of 52 cards. What is the expected number of positions where a card is directly followed by a card of the same suit? Explain your method.

What the interviewer is looking for

  • Uses linearity of expectation
  • Defines an indicator per adjacent pair
  • Computes the per-pair probability correctly
  • Gets 51 x 12/51 = 12

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Written by BlogLLM in the style of a publicly reported Tencent Hunyuan question type: derive backprop and solve a combinatorics probability problem.

Reported in: nowcoder.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official Tencent Hunyuan question.