InterviewDB Question

Flip Coins: Compute the Expected Number of Heads After Applying a Sequence of Flip Operations

Question Details

Problem You start with n coins all showing tails (0). You perform k operations. Each operation i flips every coin at positions that are multiples of i (1-indexed). After all operations, how many coins show heads? Example: Follow-ups For k >= n, a coi…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding Data Scientist