Fragen aus Vorstellungsgesprächen für software engineer, von Bewerbern geteilt
We have a pond containing a single bacterium. The number of bacteria double every 5 minutes, and the pond is full of them in 24 hours. If we started with the same pond but two bacteria, how long will it take to fill the pond?
I struggled with this a bit and got close. I believe answer is: 23:55
This is a clear case of Geometric progression. Find the nth term Tn1 = a*r^(n-1). where n = (24 * 60)/5,a = 1 and r=2. when the initial value (a) = 2, the values become n = ?, a = 2 and r = 2. Since Tn1 = Tn2, Equate the RHS of both the equation. Since the base are equal, equate the powers, doing so will give the n value. When n is convert into minutes one get 23 hrs 55 minutes.
this is easy, you don't need all the math. The pond was half full five minutes before, so it's 23:55
Two trains, each moving at 20 miles per hour towards each other, are initially 60 miles apart. A bee starts at the front of one train, flies to the other train, then back to the first train, and so on. If the bee always flies at 30 miles per hour, how far does the bee fly before the trains collide?
There are 10 stacks of 10 coins each. 9 of the stacks contain coins that weigh 1g each. The other stack contains coins of 2g each. The coins look the same. We have a scale that we can get a measurement of grams from, not a balance. We can use the scale exactly once to weigh anything here from a single coin to all of them. How can we determine which stack is the 2g coins?
Brain teaser #1: Given 8 balls and a balance, how many weighings would it take to find one ball that does not weigh the same as the other 7. Brain teaser #2: Two boys enter a tunnel. When they are 1/3 of the way through, they hear a train coming. If the boys run in opposite directions at the same speed, and narrowly miss getting hit by the train at their respective end of the tunnel, how fast was the train traveling compared to the 2 boys?