Yesterday, HR made an appointment with us today. When we were about two minutes ago, the phone rang. If the resume is incomplete, let me send it to you again. Send the email to her.
A few minutes later, the phone rings. 010. I picked up Baidu and asked if I was free? Whether to start. ..
Let me introduce myself first. This is basically the same as last time. But it seems to be more skillful. To put it simply, the other party does not like it too much.
Then, first ask an algorithm question. An array containing 0-9 numbers. It is not repeated and cannot be determined. The maximum number in a combination of these numbers that can be divided by 2, 3, and 5 at the same time. For example, the numbers 1, 3, and 2 can be 123,132, 23, and 13. Ask me if I understand the meaning of the question. Give me five minutes to consider it. I 'd like to say that I already know. However, it is still modest. This prevents the other party from getting upset. The other party gave me a number, 8, 7, 3, 5, and 0, and asked me to run it according to my own algorithm. After that, the other party said it was okay.
Below is a flow account ..
Next I will ask about the project. Let's take a look at it and ask the other party where they have questions. This process is relatively casual. As long as the other party has a reaction, it will be easy. If the other party does not say anything, it will be a real thing. I asked several details back and forth. Then the other party began offering great prizes. Yes. The client needs to query your image. Do you have any statistics on hot queries? As soon as I heard this question, I knew what he meant. Let's start with a hash to process the file name. Accumulate the same name. Finally, use the heap algorithm to calculate the top K. After talking about it, the other party is a little dissatisfied. He said, ask what to use hash here. If hash is used, the search speed is faster. He also said, "How long is your file name? Answer about 20 characters. The other party said, why hash? Is it overly-designed? It's a bit silly. Hash is just the first response, and it's not verified, and it's a little short-circuited. Let's just say, MAP, Map <string,
Int>. What can I save? I said that the int is obtained based on the string value. Why not. However, the other party is very certain .. A little messy. The recipient gave me five minutes and five minutes later. The five minutes have been a bit strange. I still don't understand why map cannot be saved. However, I have made a good effort to organize the language.
Five minutes later, I have made a more organized speech. When talking about top K, it was interrupted again. The other party asked why it could be saved? I said in the memory, the int is found based on the string. Why not. The other party said that the memory should be released after a new connection is established and the connection ends each query. At this time, I knew what he meant. I said that the statistics can be placed on the image server. The other party said that local variables will still die. I said it can be used as a global variable. When the program is opened, it can be initialized from the file, regularly written to the file, or written to the file when it is closed. The other party probably understands what I mean. Again, why is the file used. I said files are convenient. The other party asked me to estimate the system size and the amount of data generated. I will calculate the number of images that may be generated. Let's say about 200 images in an hour. What about the other party's day and month? After hearing this, I knew that the other party wanted me to think about the solution when the data volume was large. At this time, the file does not work. The other party asked me why I didn't think of using a database? I can only answer, just because I am used to using files. The number of other users dropped down for a while. Then let me evaluate whether to use files or databases, from the cost point of view. From an economic point of view, I don't seem to know how to analyze it. It can only be said that the size of files is getting larger and larger. The memory may be exhausted every time you open the image server. I also said. The other party changes to the next question.
That is, since the number of related queries already exists. So how to find hot words. A bit blind, I said, after reading this picture, the sorter won't look at it again after determining the violation. How do I need to count the popularity and how do I generate the popularity. The other party said, if there are a bunch of people looking at your images, let me look for hot queries. I said, this should be a random distribution. There is no special strategy. The other party said how it could be a random distribution. He said that if it was me, I would choose to see it on the same day. I would not see it a month ago. In this case, I am about to understand what it means. I need to find a time-related model to evaluate whether it is popular or not. At this time, only the number of statistics will not work. Replace int with double, and multiply the weights before yesterday by 0.9 every day. The day is treated as 1. Then accumulate. The other party asked me how he got there. I just said that. Then the other party asked me to quickly find the hot buzzword. I said top
K algorithm. The other party asked another question to start my thinking.
Next, the other party asked, Do you know about computer storage management? I thought, this question is too big. How can I answer this question? Let's talk about each other. When I started to write a draft, the other party would say again, for example, how the memory, buffer, and external storage work. At this time, I will know what the other party wants to ask. Yes. Then the other party said that since you know that the operating system uses this method to make the query speed faster, how can your system speed up. I said, there are three tables, the first one, the top 100, and the second one... Then, the first one is queried, and the second one is missing .. The other party said that the speed cannot be improved. A table can be used to store records and store the top K in the memory. I did not expect this. Then the other party said how to implement top
K. I said that websites are usually updated every day for Popular searches. Then we can re-calculate the top K in the early morning and put it into the memory. The other party is probably satisfied.
Then ask me, do you know about the website? It is similar to the other side. I have a good understanding of SSH, but I have no practical project experience.
Asked me what I think about the Internet. I replied.
Q: Do you know about search engines? I want to know something. Said the other party. After a bit of thinking, the general process from web crawlers to Inverted indexes to sorting algorithms is described.
The other party said there was no problem and asked me if there was any problem. So tired. Ask what to do. The other party said to be a website. I also asked, How can I use PHP? The other party said, yes. Then I want to ask a question to display the level. I can't think of it, but I can't help it ..
End on two sides. Around.
Summary:
1. Do not worry about the stress interview or rejection. The other party may make a mistake. I want to answer the question clearly.
2. think positively. It can be used properly. You can say you don't know what you don't know ..
3. We can see from the above that the final result is still statistics + top k. But the specific details may not be known. Thanks to the guidance of the engineers. Now let's think about it. We have a very good attitude. One engineer is also very good and has a good attitude. The recruitment of Baidu is impressive.
4. Don't hesitate to deliver your resume. Don't drop your resume because it is not an internal push. If it is not an Nb, don't drop your resume. There is always no loss to try. But it must be very professional. It is still a little difficult to get an offer through haitou. Submitting a resume is just to get an interview opportunity. The final result must be based on the interview performance.
5. Believe in yourself!
At, the phone number sounded. Thinking About Baidu? Answer the answer and discuss the induction time ..