You have a 100 coins laying flat on a table, each with a head side and a tail side. 10 of them are heads up, 90 are tails up. You can't feel, see or in any other way find out which side is up. Split the coins into two piles such that there are the same number of heads in each pile.

We have 100 coins in which 10 of them are heads up and 90 are tails up. Now make two piles A & B by selecting random coins.

Pile A by picking any 90 coins and

Pile B with remaining 10 coins

Now flip all the coins in pile B. It will result in same number of heads in both piles. :)

Lets discuss the solution in detail

Pile A : 90 coins

Let the number of heads in Pile A = n

The number of tails in Pile A = 90 - n

Pile B : 10 coins

Number of heads in Pile B = (Total number of heads - Number of heads in Pile A) = 10 - n

Number of tails in Pile B = (Total no: if coins in Pile B - Number of heads in Pile B) = 10 - (10-n) = n

So we can conclude, Number of heads in Pile A = Number of tails in Pile B = n

Now flip over all the coins in pile B. We now have the same number of heads in both piles.

k

just split them up

Since a coin has both head and tail hence randomly split all the 100 coins into two halves so that each pile will have equal no. of heads and tails

If n = 0, Pile A has no heads up. This means Pile B has all 10 coins with heads up. Flip all coins in Pile B would give Pile B with no heads up. That is, both Pile A and Pile B have the same number (= 0) of heads up !

if n = 0 your solution is wrong. Sorry man.