Sample Logic Puzzles Given at Job Interviews

What tasks can I face in an interview when applying for a job in QA?
At the interview, various tasks help the company’s specialists form an idea of ​​​​you as a candidate. Such tasks do not always have a straightforward solution. It is essential to show the ability to think logically and outside the box.

1 Chips

Let’s say you win a stack of chips as tall as the Empire State Building in a casino. Each chip is worth five US dollars. Will all the chips fit in a phone booth?

Solution. First, it is worth evaluating the height of the Empire State Building. It is approximately 100 floors, which means it is 100 times more than the height of a standard room. Imagine that we divided the chips into 100 stacks of equal size, one story high. Thus, a ten-by-ten matrix was obtained. Is it possible to place it in a telephone booth? Quite.

2 Challenge from Microsoft

There are three glasses: with blueberries, strawberries and a mixture of berries. Each glass is labeled incorrectly. You can get one fruit from one glass, while you can not look inside. How to find out the contents of all glasses and correctly place labels?

Solution. Since the glasses are signed incorrectly, none of them contain what is indicated on the marks. It is worth starting with the inscription mixture (C). Let’s get a berry – blueberries? So this glass of blueberries. There are two glasses marked blueberries (B) and strawberries (S). The glass (3) may contain blueberries or a mixture. But since we have already found blueberries, there can only be a mixture in the glass marked (Z). And in the last glass marked (H) there will be strawberries.

3 Buckets with water

You have an endless source of water in stock, as well as two buckets – 5 liters and 3 liters. How to measure 4 liters using only this inventory?

Solution. First you need to fill a container of 5 liters and pour some of the water into a three-liter vessel. Now there are 3 liters in a smaller bucket, 2 in a large one. Then you need to completely empty the small container and pour the remaining water from the large one into it. After that, refill the five-liter bucket and pour water from it into the three-liter bucket. Due to the already existing 2 liters, you will have to add only a liter, and 4 liters will remain in a larger bucket.

4 Task from Apple

Aliens have attacked the Earth and plan to destroy it. However, they decided to give humanity a chance. They chose the ten smartest people, put them in a row in a completely dark room and put hats on them. Hats were either yellow or blue.

After turning on the light, the alien starts asking the last person in the row what color the hat is on his head. People must comply with the following conditions when answering: speak only the color of the headdress and not be silent. If the answer is correct, the person survives; if not, the person dies.

People are forbidden to look at the color of their hats, but one can agree among themselves on some principle of answers. The colored hats are randomly placed. The answerer sees all the hats except his own.

Question: what needs to be answered so that as many people as possible survive?

Solution. The first person to answer counts the number of blue hats. If the result is an odd number, he calls it “blue”, if it’s an even number, he calls it “yellow”. So, having specified the cipher in advance, the next person can understand what color the hat is on his head, having the remaining people in the review. For example, if there is still an odd number of blue ones, then it has yellow on it. Thus, with a 100% chance, 9 out of 10 will survive, and the first one has a 50/50 chance.

5 Mysterious death

A dead man was found in a field. A match was found in his hand. Under what circumstances did the person die?

Solution. This is one of those problems that we talked about at the beginning of the article. The point is not to get the right answer, but to see how the candidate will use their imagination.

For example, this person died in a plane crash. At the time of the accident, there were no parachutes on board, and the passengers had to draw lots. The person found was unlucky.

6 Rain and sun (finally the easiest task)

It’s now two in the morning. It’s raining outside the window. How likely is it that it will be sunny in 71 hours?

Solution. Since it will also be night in 71 hours, the probability is 0%.

How can you prepare for the interview stage with logical tasks?

Practice, practice, and more practice. There are a large number of collections with tasks for logic that will help develop analytical skills. In addition, the same type of tasks is often encountered in job interviews, which means that the more tasks you have already solved, the higher the chance to cope with them faster.

You can also train your skills in logic through board games or mobile applications. For example, download a few apps and solve logic puzzles to make the most of your time on a long trip.

Listen to the terms carefully. For example, the problem of rain and sun was based on the same circumstances that many people miss due to inattention. You can always ask again; this will give you extra time to think about the details carefully.

Read the forums. On the Internet, you can get unique information from candidates who have already been interviewed and ask questions of interest.

In conclusion

Every specialist, both beginner, and advanced tester, faces logical tasks at the interview. It is important to remember that your goal is not to respond to speed or mindlessly memorize answers. It is essential to show that you know how to think logically.

Think, look for new ideas, and the position of a QA specialist will become yours!