Wednesday, March 20, 2013

You wake up groggily in the dark, On the wall next to you is a switch. what you will do ?


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?