Monday, September 23, 2013

Given n coins for two players playing a game. Each player can pick at least 1 and at most 5 coins in one turn. The player who picks the last coin loses the game. If they play optimally, which player will win the game?


Friday, July 26, 2013

What strategy should be used to kill the fewest dwarfs, and what is the minimum number of dwarfs that can be saved with this strategy?

A dwarf-killing giant lines up 10 dwarfs from shortest to tallest. Each dwarf can see all the shortest dwarfs in front of him, but cannot see the dwarfs behind himself. The giant randomly puts a white or black hat on each dwarf. No dwarf can see their own hat. The giant tells all the dwarfs that he will ask each dwarf, starting with the tallest, for the color of his hat. If the dwarf answers incorrectly, the giant will kill the dwarf. Each dwarf can hear the previous answers, but cannot hear when a dwarf is killed. What strategy should be used to kill the fewest dwarfs, and what is the minimum number of dwarfs that can be saved with this strategy?

Source: http://www.businessinsider.com/toughest-job-interview-questions-2013-7?op=1#ixzz2a9upxPNJ

Tuesday, March 19, 2013

How many passes does it take to fill in slots so that max number of people are happy


 There are 5 slots(1,2,3,4,5) and 5 people(A,B,C,D,E). Each of them provide their preferences. A=1, B=2, C=3, D=4, C=4. Given an arbitary starting sequence say BCDEA, going clock wise: how many passes does it take to fill in those slots so that max number of people are happy. People are happy if A gets 1, B gets 2, C gets 3, etc. Remember D and E cannot be kept happy together at the same time because both of them prefer Slot-4.
So Question is : Can you do better than N passes?

Suppose you reach your home and noticed that the light bulb in your corridor is not working. What will you do in such a situation?


Saturday, November 3, 2012

If 1.5 dogs eat 1.5 pounds of meat in 1.5 days, how much will 16 dogs eat in 4 days?

1.5 dogs eat 1.5 pounds of meat in 1.5 days this means that 1.5 dogs eat 1 pound of meat/day
or to get rid of the decimal, 3 dogs eat 2 pounds of meat/day so 16 dogs would eat 32/3 pounds of meat/day
because 2*16/3=32/3 so in 4 days they will have eaten 128/3 pounds of meat because 4*32/3=128/3

the answer is therefore 128/3 pounds of meat which can written as 42 2/3 .

we love comment so lets us know if any thing wrong or other way to approach the same :)