5 tasks that are suggested to be solved in interviews at Google and other large companies
Recreation / / December 31, 2020
Big tech companies love to challenge job seekers with logic puzzles to test their analytical skills and creative thinking. Find out if you can do such tasks.
1. The tainted pills problem
There are five jars of pills on the table. In one of them, all the tablets are spoiled. This can only be determined by weight. A regular pill weighs 10 grams, and a spoiled one weighs 9 grams. How do you know which jar contains spoiled pills? You can use the scales, but only once.
Show answer.
Hide the answer.
The chance that the first measurement we will immediately come across the same spoiled pill is one in five. This means that you need to weigh pills from several cans at the same time. If you take one tablet from each jar and put them all on the scales, you get the following amount: 10 + 10 + 10 + 10 + 9 = 49 grams. But this is understandable even without weighing. In this way, it is impossible to find out which of the cans contains the damaged pill.
You need to act differently. First, let's assign each jar a serial number from one to five. Then put on the scales one tablet from the first can, two from the second can, three from the third, four from the fourth, five from the fifth. If all tablets were of normal weight, the result would be: 10 + 20 + 30 + 40 + 50 = 150 grams. But in our case, the weight will be less just by the number of grams that corresponds to the number of the jar with spoiled pills.
For example, we got a weight of 146 grams. 150 - 146 = 4 grams. So the spoiled pills are in the fourth can. If the weight is 147 grams, then the spoiled pills are in the third can.
There is also another solution. We weigh one tablet from the first can, two from the second, three from the third, four from the fourth. If the weight is less than 100 grams, then the number of missing grams will indicate defective packaging. If the weight is exactly 100 grams, then the spoiled pills are in the fifth jar.
The original problem can be viewed here.
2. Traveler ants problem
In three corners of an equilateral triangle sits on an ant. Each of the ants begins to move to another randomly chosen corner in a straight line. What is the likelihood that neither of them will collide with the other?
Show answer.
Hide the answer.
The ants won't bump into each other either when everyone is moving clockwise or when everyone is counterclockwise. In other cases, the meeting is inevitable.
Each ant can go in two directions, there are three ants in total. Hence, the number of possible combinations of directions is as follows: 2 × 2 × 2 = 8. Of all the combinations, only two satisfy the condition that they do not meet.
We recall the formula for calculating probabilities: p = m ÷ n, where m is the number of outcomes that favor the implementation of the event, and n is the number of all equally possible outcomes. Let's substitute our numbers: 2 ÷ 8 = ¼. This means that the chance to avoid a collision is one in four.
The original problem can be viewed here.
3. The burning ropes problem
There are two ropes impregnated with gasoline for better flammability. Each of them burns out in exactly one hour. Ropes are known to burn at an inconsistent speed: some sections are faster, some are slower. But it always takes an hour to complete the process. How do you know that 45 minutes have elapsed using only these two ropes and a lighter?
Show answer.
Hide the answer.
It is necessary to simultaneously set fire to the first rope from both ends, and the second rope from only one end. These ropes must not touch. The first will burn out in 30 minutes - this is exactly how much the tips set on fire on both sides will meet. When this happens, the second rope will only have a length of 30 minutes. You need to quickly set it on fire from the second end, then the lights will meet in 15 minutes, and only 45 will pass.
The original problem can be viewed here.
4. Water transfusion problem
There are two buckets with a capacity of 3 and 5 liters, as well as an unlimited supply of water. How can you measure exactly 4 liters of water with them? It is impossible to pour and pour the liquid over the eye, pour it into some containers and places not indicated in the condition, too.
Show answer.
Hide the answer.
Solution 1. You need to pour 5 liters of water into a large bucket, then pour 3 liters of water from it into a small one. The large bucket will leave 2 liters of water. Now pour out 3 liters of water from a small bucket and pour into it the 2 liters that remained in the large bucket. We refill the five-liter bucket to the brim, pour one liter out of it into the three-liter bucket, which already contains two. This means that 4 liters will remain in the large bucket, which we needed.
Solution 2. We fill a three-liter bucket to the brim, pour it entirely into a five-liter one. Then we repeat these steps again until the five-liter bucket is filled to the brim, and there is no 1 liter left in the small one. Now we pour out the water from the five-liter bucket. Pour 1 liter into a 5 liter bucket, fill a small bucket to the brim, pour into a large one. Voila!
The original problem can be viewed here.
5. Fruits and boxes problem
In front of you are three boxes of fruit. In one of them there are only apples, in the other - only oranges, in the third - both apples and oranges. What kind of fruits are inside the boxes, you cannot see. Each of the boxes has a label that says it, but the information on it is incorrect.
You can take one fruit from any basket with your eyes closed and then examine it. How can you tell which fruit is in each box?
Show answer.
Hide the answer.
The trick is that all the boxes are labeled incorrectly. This means that each is not what is indicated on the label. That is, the box labeled "Apples + Oranges" can contain either only apples or only oranges. We get the fruit out of there. Let's say we come across an apple. So this is a box of apples. There are two boxes left: labeled "Apples" and labeled "Oranges."
Remember that the information on the labels is incorrect. This means that the box marked “Oranges” can contain either apples or a mixture of fruits. But we've already found the apples. Hence, this box contains a mixture of fruits. The remaining box labeled "Apples" contains oranges. Similar reasoning allows us to solve the problem if we took out an orange from the basket with the words "Apples + oranges".
The original problem can be viewed here.
When preparing the article, information from the site was used Glassdoor.comwhere former and current employees share their experience of interviewing in different companies.
How do you like the tasks? Show off in the comments how much you've decided so big companies know which employees are losing!
Read also🤔
- 9 logical problems that only real intellectuals can handle
- Answer Elon Musk's question and find out if SpaceX would take you
- 10 tricky tasks to test your logic and ingenuity