I was browsing EWeek Wierd Job Interview Questions 2010 which I would like to answer … well come of it that I find interesting…. here are the quetions.
- “Given the numbers 1 to 1000, , what is the minimum number of guesses needed to find a specific number if you are given the hint ‘higher’ or ‘lower’ for each guess you make.”
– Asked for a software engineer position at Facebook
Quickest answer is at least 1. right? If the question want the worst case, the minimum guest can be computed from an = a0 r n. Where a0 is 1000 numbers to choose from, a1 is 500, and so on dividing by 2, so r should be 1/2. Solving for n, we can compute it a n = log(1/1000) / log(1/2) which gives us 9.97 or say 10 guess!
- “There are three boxes, one contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels. Opening just one box, and without looking in the box, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly?”
– Asked for a software QA engineer position at Apple
The answer should be, we should pick the box labelled apple and orange. We would either get an apple or an orange. If apple, the box label for apple should be on this box and the apple and orange label should be on the third box and the box formerly labelled apple should be the orange one.
Orig Label Apple case Orange case Apple Orange Apple/Orange Orange Apple/Orange Apple Apple/Orange Apple Orange
- “How do you weigh an elephant without using a weigh machine?”
– Asked for a software engineer position at IBM
We can place him on a boat and calculate the water volume displaced. With water density at 1 kg/liter, the volume of water is equal to the weight of the elephant in kg.
- “You have 8 pennies, 7 weigh the same, one weighs less. You also have a judge’s scale. Find the one that weighs less in less than 3 steps.”
– Asked for a systems validation engineer position at Intel
I love this question. But it can be better. We can find the lighter coin with only two weighing. How? you say? Take 6 coins and weigh them, 3 on each side. If the stack of 3 coins are balanced. Weigh the 2 coins that was left and you instanly have the lighter coin! If one side is lighter than the other, take 2 coin from that stack and weigh that. If it’s balanced, the one you did not weigh is the lighter coin. If one is lighter, you got your coin! See! Only two measurement!
- “A train leaves San Antonio for [Houston] at 60 mph. Another train leaves [Houston] for San Antonio at 80 mph. [Houston] and San Antonio are 300 miles apart. If a bird leaves San Antonio at 100 mph, and turns around and flies back once it reaches the [Houston] train, and continues to fly between the two, how far will it have flown when they collide?”
– Asked for a software engineer position at USAA
This is just a simple algebra problem we can solve based with the formula Distance = rate x time. the time for the 2 trains to collide is T = 300 / (60+80) = 15/7 hours. During which time the bird have flown D = 100 x 15/7 = 1500/7 = 214 and 2/7 miles.
- “Out of 25 horses, pick the fastest 3 horses. In each race, only 5 horses can run at the same time. What is the minimum number of races required?”
– Asked for a software developer position at Bloomberg LP Financial
I also like this question. First batches will have 5 races. Take the top 3 on each of that races. The 6th race will be the race of 5 of the 1st place horses and the winner is obviously the fastest horse. The second and the third place is a candidate for the top 3 fastest horses. The 7th race will be for 5 of the 2nd place horses. The top 2 horses will have a chance to be the top three of the whole group. And the 8th race will be for the5 of the 3rd place horses. Get the 1st placer for this race and combine with the 2nd and 3rd of the 1st place race, and 1st and 2nd place of the 2nd place race. The 9th race will give us the second fastest and the 3rd fastest horse of the 25.
First Round Races
Race a Race b Race c Race d Race e 1a 1b 1c 1d 1e 2a 2b 2c 2d 2e 3a 3b 3c 3d 3e
Second Round Races
Race entries 1st 2nd 3rd Race f 1a, 1b, 1c, 1d, 1e 1ST 2f 3f Race g 2a, 2b, 2c, 2d, 2e 1g 2g 3g Race h 3a, 3b, 3c, 3d, 3e 1h 2h 3h Final Race 2f, 3f, 1g, 2g, 1h 2ND 3RD 4TH
So we can determine the top 3 fastest with just 9 races.