## McAfee Interview Question for Developer Program Engineers

Country: India
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
1
of 1 vote

A classic question is: Divide into two sets, such that each contains the same number of heads (note: not necessarily 10 heads each).

Perhaps you have your own interpretation in mind and didn't really understand the actual question?

Comment hidden because of low score. Click to expand.
0

How do you solve even that?

Comment hidden because of low score. Click to expand.
0

dividing into 2 sets with equal number of heads and tails easy...
divide into 2 sets first, so we will get one combination like below
set1: 6H+4T
set2: 4H+6T
if you flip all coins on one side then it will become equal number of heads and tails on both side...

Comment hidden because of low score. Click to expand.
1
of 1 vote

//can not be done exactly. gut here is the try ->
flip 10 of them ,, not we have majority of heads or tails except we got all heads or all tails . move 10 of them . flip the other group of coins.

Comment hidden because of low score. Click to expand.
0
of 0 vote

flip 10 of them ,, now we have majority of heads or tails ,except we gets all heads or all tails . move 10 of them to a group . flip the other group of coins.

Comment hidden because of low score. Click to expand.
0
of 0 vote

For any given number, divide them into two group of equal number.
Say we have 20 Coins, and we have to divide them into 10-10's Group,

First 10 would contain say x Heads, and ( 10 - x ) tails.
while other group would contain ( 10 - x ) heads and x Tails.

Just flip one Group totally, and it would be same as the other Group. in other words,
x heads and ( 10 - x ) tails would convert into ( 10 - x ) heads and x tails. which is similar to other group.

Comment hidden because of low score. Click to expand.
0
of 0 vote

I tried solving the question as you phrased it but no luck, as far as I can tell it looks impossible.
does anyone think there is a way to actually separate the coins into two setts of either all head or all tail?

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.