Puzzle Based Interview Questions
You have 2 supposedly unbreakable light bulbs and a 100-floor building. Using fewest possible drops, determine how much of an impact this type of light bulb can withstand. (i.e. it can withstand a drop from 17th floor, but breaks from the 18th).
Note that the ever-popular binary search will give you a worst case of 50 drops. You should be able to do it with under 20.
There are n gas stations positioned along a circular road. Each has a limited supply of gas. You can only drive clockwise around the road. You start with zero gas. Knowing how much gas you need to get from each gas station to the next and how much gas you can get at each station, design an algorithm to find the gas station you need to start at to get all the way around the circle.
Out of 10 coins, one weighs less then the others. You have a scale.
o How can you determine which one weighs less in 3 weighs?
o Now how would you do it if you didn’t know if the odd coin weighs less or more?
What is the next line in the following sequence:
Answer: it’s 1211 and the next is 111221