1.

As you reach Iraq, you see 49 people fighting among themselves to split their prize money. Many don't want to divide it into 49 equal parts as they worked harder than the others. To resolve the issue, the Owl suggests a way: "If 50% or more people in the group agree on splitting equal- ly, then they will split equally. If not, the person with the least contribution loses his claim, and is out of the group. The voting continues till a solution is reached".(ex : Suppose there are 10 people left. If 5 or more agree to divide the prize money equally, each would get an equal share. If not, the 10th ranked person is out of the group, and voting continues with the 9 people left). The issue is: The government of Iraq wants to issue ‘d’ denominations of coins (in whole numbers of dinars(Iraqi curren- cy)) so that by using no more than 3 coins, citizens can pay any amount from 1 dinar to 36 dinar. Find the value of‘d’ and all the ‘d’ denominations and give the sum of all these ‘d’ denominations? (Ex: if d=3 and 3 denominations are {4,5,3},answer= 4+5+3= 12.)

Answer»

Solution :40
‘d’ =5 is the most OPTIMIZED solution and the following is the only possible combination for d=5 1+4+6+14+15.


Discussion

No Comment Found

Related InterviewSolutions