# 10 problems with the interviews in large companies Bashny.Net

Famous corporations - Google, Intel and Apple - famous for the fact that the interview ask applicants tricky puzzles. Site AIN.UA collected 10 interesting examples of such problems. Some suggested the companies themselves, and some users have posted already be interviewed. They require knowledge of mathematics at the school level or just savvy.

Website provides a check, how would you deal with this interview.

Objective 1.

The task logic. Sheldon Cooper (the most brilliant physicist from the popular series) came in the game quest in pursuit of the treasure to the last ditch. In front of him - two doors, one leading to the treasure, the second - a mortally dangerous maze. Each door is a guard, each of them knows which door leads to the treasure. One of the guards never lies, the other - always lying. Sheldon does not know who is the liar, and who is not. Before choosing a door, you can ask only one question and only one guard.

Q: What to ask Sheldon at the guards to get to the treasure?

You can ask anyone in this case ask the question: "What is the door, according to another guard, right?". If he asks a truthful, it is evidence which door leads to a maze, because the guard is always telling lies lying. If he asks the guard telling lies, again, know which door leads to a maze, because the sovret of the door, which will indicate the true guard.

Objective 2.

Land captured aliens. They plan to destroy the entire planet, but decided to give humanity a chance. They chose ten smartest people and put them in a completely dark room, planted in a row, one after another. In each of the people we put on the hat, the hat just two colors - pink and green. After all the hats are on their heads, the light turns on.

The alien starts with the last man in the row and asked about the color of the hat on his head. In other words, except for the color hat, you can not utter. Remain silent - too. If he answers correctly, survives, is mistaken - he is killed.

You can not see the color of your hat, but it is possible to agree on a certain principle that meet all. Location of hats - a random, can be any combination, you can see all the hats, which are located in front of you.

Q: What you need to answer in order to survive as many as possible?

The first charge counts the number of green hats in front of him: if it is an odd number, it is called "green", even if - "pink". Next, seeing the number and color of the hats in front of him, can thus calculate what color hat on his head (for example, if the green is still an odd number, it is obvious that it - pink), and so on. Thus guaranteed to survive 9 out of 10, and at the first chance in charge 1 to 1.

Objective 3.

You have 50 motorcycles with fuel in the tank, which is enough for 100 kilometers away.

Q: Using these 50 motorcycles, how far you can call (given that initially they are conventionally single point in space)?

The easiest answer is to have them all at once and drive 100 km. But there is another solution. Please move all the bikes for 50 km. Then pour half the fuel of motorcycles in the other half. You thus - 25 motorcycles with a full tank. Keep driving for another 50 km and repeat the procedure. So you can get up to 350 km (without considering the fuel, which will remain on the "extra" in the motorcycle section 25 in two).

Objective 4.

You have an infinite supply of water and two buckets - 5 liters and 3 liters.

Q: How do you measure out 4 liters?

Fill a five-liter bucket with water and pour the water in a three-liter. You are now in a small 3-liter bucket and 2 - in the large. Empty the small bucket and pour back the remaining 2 liters from the large. Refill the large bucket and pour out the water in the small. There are already two liters of water, so that the need to add liter, and remains in a large 4 liter.

Target 5.

You have two lengths of rope. Each such that if burn it at one end, it will burn exactly 60 minutes.

Q: With only a box of matches, how to measure with the help of two segments of 45 minutes a rope (the rope can not tear)?

One of the segments is ignited on both ends, while simultaneously ignited by a second segment, but with one end. When the first segment burn out completely, it may take 30 minutes from the first well will be a 30-minute segment. Setting fire to it at both ends, we get 15 minutes.

You have 8 balls of the same type and size.

Q: How to find the heavier ball, using only two scales and weighing?

Collect 6 balls, divide them into groups of 3 balls and put on the scales. Group heavier ball would chip bowl. Select any two of these three balls and weigh them. If the heavy ball among them, you know it; if they weigh the same - a heavy one that remained. If a heavier ball in groups of 3 ball was not he - among the 2 remaining.

Target 7.

This task describes the user, which sobesedovali the position of senior systems engineer. He noted in the description of the problem, he had his answer, about which he had a long argument with the person being interviewed.

Suppose we have going 10 packet data over the wireless network. The channel is not very high quality, so there is a possibility of 1/10 that the data packet has been transmitted. The transmitter always knows was successfully or unsuccessfully transmitted data packet. When the transmission is unsuccessful, the transmitter will send the package as long as it succeeds.

Q: What kind of bandwidth we get?

Release user answer would be: 9 pps. But the person who conducted the interview, did not agree with him, however, he did not give an answer, but repeated that "because of the retransmission bandwidth must be reduced by more than 1/10ยป.

Target 8.

This task was offered to settle for entry to the School of Data Analysis in February 2014.

The game consists of identical and independent laws, all of which gain occurs with probability p. When a player wins, he gets \$ 1, and when it loses - pays 1 dollar. Once it reaches the capital value of N dollars, he is declared the winner and removed from the casino.

Q: Find the probability that a player eventually lose all the money, depending on its initial capital K.

Target 9.

This task is offered to developers to decide during the interview, and it is more directly related to programming than the previous examples.

There is a morphological dictionary of about 100,000 entries in which the words of perfect and imperfect species are placed in separate articles (that is, "to do" and "do" are considered different dictionaries included). Do you want to find in the dictionary such species pairs and "stick together" in one article.

Q: Describe the overall scenario of solving this problem and the approximate search algorithm species pairs.

Responses to the problem of "Yandex" we, unfortunately, no.

And a bonus Target 10.

This problem is attributed to Albert Einstein - allegedly with the help of assistants, he picked himself. Another almost legendary story attributes the Lewis Carroll. Note that it is very easy to solve on paper, but if you want hardcore - try to solve the mind.

On the street there are five houses.
The Englishman lives in the red house.
Spaniards have a dog.
In the green house drinks coffee.
The Ukrainian drinks tea.
The green house is immediately to the right of the white house.
Anyone who smokes Old Gold, breeds snails.
The yellow house smoke Kool.
In the central house drinks milk.
The Norwegian lives in the first house.
A neighbor of the one who smokes Chesterfield, holds a fox.
The house next door to the one in which holding horse smoking Kool.
Anyone who smokes Lucky Strike, drinking orange juice.
The Japanese smokes Parliament.
The Norwegian lives next to the blue house.
Each house is painted in a single color in each house lives a representative of a separate nationality, everyone - your pet, a favorite brand of cigarettes and a drink.

Q: Who drinks water? Who holds the zebra?

Japanese holding a zebra, a Norwegian drinking water.

via #

(c) 2012-2020