# IDEA import project but cannot load the jar package dependent on the pom.xml file

2023-03-14

1. There are 100 couples in the village, and each husband hides his wife to steal affection. Essence Essence Every wife in the village can immediately find out whether the men other than their husbands are secretly affectionate, but they don’t know if her husband has a secret affection. The rules in the village are not tolerated. Any wife, once he can prove that his man stoles affection, he must kill him that day. The women in the village are all strictly acting in this rule. One day, the female head came out and announced that at least one husband in the village had affection. What will happen next?

Answer: This is a typical recursive question. Once all his wives know that at least one man is derailed, we can look at this process as recuvically. Let us assume that there is only one husband stole affection. Then his wife couldn’t see any affectionate man, so she knew that this person was her husband, and she would kill him that day. If there are two husbands stole affection, their wives only know that the man who is not his husband stole love. So she would wait to see if that person was killed one day. If no one was killed on the first day, she would be sure of her own husband. According to this kind of push, if there are 100 husbands stole affection, they can live safely for 99 days, until 100 days, all wives kill them all.

Application position: product manager

2. Assuming that on a highway, the probability of seeing the car passes within 30 minutes is 0.95. So, what is the probability of seeing a car passed in 10 minutes? (Suppose default probability is fixed)

Answer: The key to this question is that 0.95 is the probability of seeing one or more cars, not the probability of seeing only one car. Within 30 minutes, the probability of not seeing any vehicle is 0.05. Therefore, the probability of not seeing any vehicle in 10 minutes is the cubic root of this value, and the probability of seeing a car in 10 minutes is to minus this cubic root, which is about 63%.

Application position: product manager
3. There are four people who go through a suspension bridge at night and return to the camp. But they have only one flashlight, and the battery is only for 17 minutes. Crossing the bridge must have a flashlight, otherwise it is too dangerous. The bridge can only bear the weight that two people passed at the same time. The speed of these four people’s bridge is different: one takes 1 minute, one takes 2 minutes, one takes 5 minutes, and one takes 10 minutes. How can they cross the bridge within 17 minutes?

Answer: 1 and 2 Passing together (2 minutes); 1 return (3 minutes); 5 and 10 together (13 minutes); 2 returns (15 minutes); 1 and 2 together (17 minutes). All safe bridge.
Application position: product manager
4. You and a friend attend the party. The party counts a total of 10 people. Essence Essence Your friend wants to bet with you: Every time you find one of these people in the same birthday, you will win 1 yuan. Every time he finds someone who is different from your birthday, he won 2 yuan. Should you play this bet?

Answer: If you don’t count on the leap year, the probability of others is the same as your birthday of 1/365; the probability of different birthdays is 364/365. So don’t play this bet.
Application position: product manager

5. If you see that the time on the clock is 3:15, what is the angle between the timing of the clockwise and the needle? (The answer is not zero)

Answer: 7.5 degrees. Each minute on the clock is 6 degrees (360 degrees/60 minutes). The hour hand walks from one number every hour to the next number (this example is from 3 to 4 o’clock), which is 30 degrees. Because the time in this question has just walked for 1/4 hours, the time of the clockwise 30 degrees 1/4, which is 7.5 degrees.
Application position: product manager
6. After folding a wooden bar into 3 sections, how much is the probability of forming a triangle?

Answer: Because the topic is not required to be connected to the first and tail into a triangle, the answer is 100%. Any three wooden strips of length can form a triangle.
Application position: product manager
7. There is a delay problem in South Africa. Please analyze it.

Answer: This is obviously a very vague question, so there is no only correct answer. A better answer should be the familiarity of the concept of “delay” and exerting their imagination by the interviewer, conceiving an interesting delay problem and providing an interesting solution for it.

Application position: product manager

8. There are three points on a two -dimensional plane. Can you make a few lines that are the same distance from these points?

Answer: Three. Two points are connected into a line segment. In the middle position between this line segment and the third point, do a straight line parallel to this line, that is, a line that is three -point equivalence. Then follow this method to make the other two combinations.
Application position: Software Engineer

What is the 64th power of
9 and 2?

Answer: If you are not sitting in the interview room and there is no calculator at hand, it should be easy to find the answer, that is, 1.84467441 multiply the 19th side of 10.
[If I am, write one 1, and add 64 zero later, which is a 2nd -in -made answer, haha. —— Translator Note]
Application position: Software Engineer
10. Suppose you are full of shirts in the closet, it is difficult to pick out a certain piece from it. How do you plan to organize it so that they can choose easily?

Answer: There is no fixed answer on this question. The test is the imagination and creativity of the interviewer in terms of problem solving. We think that the answer of the reader’s “Dude” may be impressed by Google: the one of the types of fabric is carried out by the type of fabric. Each type is then sorted by 2-3-4 trees or red and black trees (all computer algorithms).
Application position: Software Engineer
11. Give you a tic tac toe. Essence Essence You can write a program, the entire game and the name of a player as the parameter. This function needs to return to the game result, that is, whether this player has won. First of all, you have to decide which data structure is used to process games. You also have to tell which algorithm use first, and then write the code. Note: Some grids in this game may be empty. Your data structure needs to be taken into account this condition.

Answer: The required data structure should be a binary character number. Call this function to check 6 conditions to determine whether there are winners. The sixth condition is to see if there is a space. If there is a winner, the character judges whether the player is x or O. So you need a flag. If there is a winner, return this value and end the game, if not, continue the game.
Application position: Software Engineer
12. How long does it take for 1 trillion to sort? Please say a reliable estimate.

Answer: This is another question without standard answers. The purpose is to investigate the creativity of the interviewer. We tend to be a simple answer given by the two readers: sorting with merger sort. In the case, O (100,000,000,000,000 LOG 1,000,000,000,000,000,000). In the worst case, O (100,000,000,000,000 LOG 1,000,000,000,000,000) [The two are the same. —— Translator Note]. It can now be performed by 1 billion times per second, so it should take about 3,000 seconds.
Application position: Software Engineer
13. Please design an algorithm of the “Frog Jump” game and write the code of the scheme. Essence Essence

Answer: The goal of this game is to guide a frog to avoid passing vehicles and cross a busy road. You can use a number to represent a lane. Simplify the plan into a road of N -lane. We only found a answer to this question. It comes from the Glassdoor.com website: “One method is to write a recursive algorithm to determine when to wait and when to jump into the next lane. Obstacles to determine. “
Application position: Software Engineer
14. How many software engineers do Google receive each year? This is also investigating whether the examinee has the ability to simply clarify the problem and propose a creative solution.

Answer: A job seeker of a “quantitative remuneration analyst” position should know that Google hired 3,400 in 2008. It is estimated that 75%of them, that is, 2550 people, should be engineers, and the admission rate of Google and Harvard is similar, that is, 3%from the applicant. It can be seen that it should be received about 85000 resumes (85000 x 3% = 2550)
Application position: quantitative remuneration analyst
15. Give you a digital linked list. Essence Essence The linked list will start from scratch (circular linked list) from the beginning. Please write the highest effect algorithm looking for the minimum number in the linked list. Find out any given number in this linked list. The numbers in the linked list are always increasing, but you don’t know where the circular linked list starts. Example: 38, 40, 55, 89, 6, 13, 20, 23, 36.

Answer: Our favorite answer comes from the reader “Dude”: Create a temporary pointer and start from the root. (Most of the cycle linked lists have forward or backward pointers.) Judgment is bigger forward or bigger. If you go forward, you know that the linked list has reached the end of the linked list, and the position of the linked list is reached. If you move forward, [the original text is so, it should be “smaller forward.” ——The translator’s note], then you can search back and make numbers. If there is no root nor pointer to the linked list, your data is lost in memory.

source