Katkat

How do you split coins to match heads?

BnpData Scientist · Technical Screen

Last updated

This question evaluates logical reasoning about invariants and combinatorial parity, testing the candidate's ability to design deterministic strategies under partial information; it falls under Software Engineering Fundamentals with relevance to probability and discrete mathematics for a Data Scientist role.

There are N coins on a table. You are told that exactly H of them are heads-up (you do not know which ones). You must split the coins into two piles so that the number of heads-up coins is the same in both piles. You are allowed to flip any coins you choose.

Describe a strategy that always works and justify why it works.