How do you split coins to match heads?

Quick Overview

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.

How do you split coins to match heads?

Company: Bnp

Role: Data Scientist

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

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.

Overview: 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.

|Home/Software Engineering Fundamentals/Bnp
Bnp logo
Bnp
Jan 5, 2026
easyData ScientistTechnical ScreenSoftware Engineering Fundamentals
3
0

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.

Loading comments...