[algogeeks] coin problem

2012-07-31 Thread Navin Kumar
You are blindfolded and 20 coins are placed on the table in front of you. Out of them 10 coins have heads facing up and other tails. You are allowed to flip and move the coins. You should divide those coins into two sets such that one set contains 10 heads and other tails. You are allowed to

Re: [algogeeks] coin problem

2012-07-31 Thread Hariraman R
You just split the 20 coins into two groups such that each one contains 10 coins. Now you have to flip any one group of coins so that you will get same no. of heads and tails in each group. For example,consider the 1st group contains 7 heads and 3 tails so obviously the 2nd one contains 7 tails