Baidu Pen & face Sutra

Source: Internet
Author: User

After reading the essence area, it seems that there are very few pieces of experience and Experience About Baidu, so I will try it out and accumulate RP ~~ PS: I am a business search engine R & D engineer.

[Written Test] Baidu's written test at huake will be held immediately after the presentation on the evening of April 9. The presentation was called a great place, and many people who were not in the graduating class also came to join in and feel Baidu's recruitment. There are three types of test questions: multiple choice questions, programming questions, and system design questions. It is not very difficult to select questions, but I am too watery to remember a lot of basic knowledge, such as regular expressions and shell programming ~~~ Sweat, not to mention, many of them are blind. There are three programming questions. The first question is to find the maximum unduplicated substring of the string and the output length. I thought about O (N ^ 2) algorithms for a long time. It was a stupid method that I could come up with. It didn't make sense to think about writing it down) it seems that there must be O (N), so I won't write it. Let's look at the questions below. The second question is to find the longest substring of a string. This question seems to have been tested before.
When I reviewed the data structure, I thought it would be possible to use the stack to judge a text string. I just recalled it and the algorithm came out. So I wrote down an O (N ^ 3) algorithm. I am so stupid that I can only come up with this garbage calculation method. It seems that Baidu is not easy to mix. The third question is to find non-repeated integers among the 0.25 billion integers. The memory space is insufficient to accommodate these 0.25 billion integers. This question is a special feature of Baidu. I have no idea about massive data processing. Since it cannot be thrown into the memory at a time, I will throw it in batches to minimize the number of times the memory is read from the external memory. Then I will calculate the number and try to throw it into two batches. Sort each batch to find the number of non-repeated items in each batch, repeat the non-repeated items in another batch, remove the duplicated items, and summarize them. No specific code can be written, just write down the idea. At that time, I was so depressed that I thought about it. When I got down, I couldn't write the code. It was very inefficient to write a question. Last System
I don't have a good idea about the design question. The question is about the distribution of massive data in 100 computers, and I want to find a way to efficiently count the top 10 data sets. I wrote a few scripts, and the time is up ~~~ It seems that this time, unless there is a miracle, the written test will definitely be BS.

After the examination, I went back to the dormitory and discussed the problem with my brothers. The first question was originally implemented using hash, and the time complexity was reduced to O (n ). I thought for a moment, and the idea of the entire algorithm was clear and depressing. I did not think of such a simple question. It seems that I am still too comfortable. ZZ also had a novel algorithm for the second question. After learning it, I liked it and thought it out. The next day, I had Microsoft's written test. I had to take primer and hold on to it. Why didn't I read such a good book when I learned C ++? Regret and annoyance are filled with my brains, and I feel quite anxious. Although I had a bad test, I still hoped to have a miracle and had a chance to go to the interview. So I went to bed at night and drove my cell phone. During the forum, I said that if I passed the test, I would try again in the early morning. In the evening
It's hard to fall asleep. I don't know when the phone rings. In the morning, I got up and looked in the mirror. The giant panda reappeared and pulled it. Alas, I am worn out by Baidu. It's useless to think about myself. There's still Ms waiting for me. When I took the MS test, my cell phone did not close, so I waited for Baidu's phone number. I hope there will be a phone number during the test. Sure enough, when I was still taking the test at a.m., my cell phone rang and hung up. I was scratching my head for the MS test. A few minutes later, it rang again and again. After the test, I checked the camera in the test room. The answer was, and it seemed like a PHS. You can't get back, but you can't get back. The call failed after more than 10 times, so I had to wait for him to call again. Go back to the lab room and ask if this number belongs to Baidu. The JG said yes. Surprise, oh, yeah, Baidu has an interview,
Miracle happened. So he and JG, DJ, and Q went to Hongyi to meet Baidu. As a result, the facial recognition officer said that I did not answer the phone. They arranged for an interview with other students and asked me to come back at the next morning. FT, why is it so tortuous, but it's good to give me some time to review and prepare.

[One side] I took a good look at the project at night and reviewed the key points. I also asked what I asked during the JG interview. The next day, a person flew to Hong Yi and spent 22 oceans. I went to the room yesterday and saw the meeting officer. I had a bald head, just like the face officer of JG yesterday. Sure enough, he asked me the same question I asked JG yesterday. He designed a data structure that combines the advantages of linked lists and arrays. I thought about using hash linked list, which makes insertion and search more efficient, but there is a conflict problem to be solved. He immediately asked me how to solve the conflict problem. There is no good solution. I will modify the hash function to minimize the conflict probability generated by the hash value. He asked, How do you design it? I don't think about this. Depressed on the spot, and immediately fell into a bitter state. Come up with a few ideas
Son, no matter whether or not he can reduce the probability of conflict, he said to the facial administrator. He quickly gave an example to deny my hard-to-use ideas and said that your solution would not work. Is there any better solution? I tried my best. I didn't expect him to find a counterexample so quickly, so I was depressed. However, the audience is very good. I can't think of anything better, so I won't be embarrassed. I want to change to the next question. The next question is the massive log data, which extracts the IP address that visits Baidu the most frequently on a day. I thought about it and gave a thought. The interviewer asked you if the storage space required was too large and there was no optimization method. The idea is correct, but the optimization problem is tricky. I also talked about an optimization method. The facial recognition officer was not satisfied and shook his head. I can't think of it anymore .... It's no longer difficult for me to see me think twice. Then I asked about the project experience. I spoke about balabala, but he was not familiar with my project and didn't ask any questions.
Then I asked the test paper. Why is the first question blank? I explained the reason. He asked me if I had a good idea? I spoke about the O (n) algorithm I thought about after the examination. He was satisfied and asked the second question without asking me anything. I also talked about my current algorithm IDEA. He asked if there were any better optimization algorithms? I said I can do O (N ^ 2) and I will explain my ideas. It seems that he was not satisfied with the answer and did not ask me anything. Then I asked the third question. I spoke about my thoughts. He said, do you still need to find the problem in the end? For two ordered arrays, is there any better algorithm to find the elements of array a in array B? I thought for a moment, and suddenly I had a chance to think of the merge sort algorithm. Let's just say, is it possible to locate a in B just like merging arrays, so that it can be implemented in O (m + n. He was satisfied and said, "Yes, they are all in order. Are you still so troublesome ?" Violent sweat, it seems that the face level is much higher than me, and my mind cannot keep up. Then I finally smiled and asked, "Do you think I can accept this algorithm ?" His answer surprised me. He said: "Of course you can accept pull. I think it is quite good. However, if your algorithm needs to access external storage, it may not be very time-efficient. However, you must first complete the task of the question and then consider optimization ." I quickly added: "Yes, first let it work, and then think about how to make it work.
Better ." "However, the best algorithm for this question can throw 0.25 billion pieces of data into the memory at a time. This requires you to design a good data structure ." I asked, "How can I design this ?" The facial recognition officer said he could not tell me the answer and asked me to go back and think about it. At this time, the facial recognition officer looked at the table. I also looked at the table. It has been covering for 50 minutes. "Now we have two more mathematical reasoning questions," he said. Question 1: There are two boxes with a large enough capacity. Now there are 50 red balls and 50 blue balls. How do you place these balls into the box so that I can randomly select a box, then randomly draw a ball from the ball. Is this ball the highest probability of a red ball? We will give you two minutes to consider and give you the results through visual analysis ." On the spot, I fainted. from small to large, I would not do IQ questions. This is my weakest item. No way. You can't just say I won't. I had to stick to my head and analyze it.
Next, I said, "The expression of the column's probability. If you want to evaluate the maximum value, you can find the result ." He said, "You have not been able to calculate the result for two hours. You can see the results from an intuitive analysis. You can think about it again. I had to keep thinking. I thought, put 50 red balls in one box, and put all the blue balls in another box. In this case, there were 100%, and the other was 0%, with an average of 50%. It is not ideal. At this time, the inspiration suddenly exists. Isn't it a waste to put 50 red balls in one box? Put one to 100%, and two to 100%, then put one, and all the others are thrown together with the blue ball. Think about it again. The probability is 75%, which should be very high. I did not think carefully about the correct answer. I just spoke out and said this method. The facial officer smiled again and said, "correct !" I was so excited.
I was lucky enough to get a correct answer. Next, let's take another question: A's shooting hit rate is 80%, b60 %, C40 %, A, B, and C. Each person knows the hit rate of the other two, three people shot each other in the same field and shot the first shot at the same time. After the first shot, who was the most likely to lose the first shot? I analyzed the answer and asked my thoughts. After I spoke about my ideas, he said, "Your thinking is different from that of others ." Ft. I'm not the same as others. I guess it's wrong. I did answer IQ questions, but I was dumb. The facial officer said, "Okay, it's almost time. Do you have any questions ?" I asked: "If I am lucky enough to pass one side, when will it be two sides ?" "If it passes, it will be available tomorrow morning ." Then, I reached my hand and ended my face.
After finishing the meeting, I went to LP for dinner and accompanied her to study in the afternoon. I felt like I was okay. I answered most of my questions. Although I did not want to complete further optimization, in addition, I was lucky. Even the last two questions were still masked to the first question. If I couldn't enter the second question, I could only explain that the difference between my requirements and Baidu would be too big. As a result, good luck came again. At, I received a call and notified me that I had to go to the second place at the next day.

[Two sides] I went to the interview room on time the next day and changed my facial recognition. When I first came up, I asked a question about massive data processing. The question is: There are a lot of record data, there are idnumbers, there are several different attribute domains, now we need to query the corresponding idnumber data based on the ID number, and design an algorithm. Then, now you want to sort queries by specific attribute domains, both to efficiently locate the records that rank in the N-M name, but also to insert, delete records frequently. I said that the query ID can be queried using the hash table, hash the ID, and then the corresponding records can be found in O (1. The second problem is a bit complicated. It is similar to designing a Data Structure Based on the advantages of arrays and linked lists. I spoke about several solutions and asked him if this would work. He said, "You don't think you can do it yourself. Now it's me, not you, and you think about the answer yourself ." Fainting, I can't think of anything better, either.
I don't know how to choose it. The options have their own advantages and disadvantages. Finally, I chose one of them and answered this question. "In fact, it is difficult to have the best solution to this problem. It depends on how you choose, weigh, and select a better solution," said the facial recognition ." Alas, I don't know if my answer is acceptable. I have no idea at all. Then I looked at my resume and said with amazement, "are you from Wuhan tech ?" I was surprised: "Have you heard of this school? "Because I feel that Wuhan Institute of Technology is not very famous. In the north, even Huazhong technology is not very famous. I didn't expect the facial officers to know Wuhan Institute of Technology. "I graduated from Wuhan Institute of Technology ." As soon as you hear it, there are still alumni in your heart. Hurry up and get close to each other. Ask him which level he is, when he graduated, and how long he has joined Baidu. Then I spoke about my personal feelings about Wuhan Institute of Technology, especially when I gave up my research quota and chose to take the postgraduate entrance exam. He also thought it was a bit interesting, and I continued: "I think the learning atmosphere is very important, and my classmates have a great impact on me. When I was a bachelor, many of my colleagues fell victim to online games and did not have any questions they wanted to discuss with others. Now I have been to Huazhong technology, and my colleagues are very good. I often discuss issues with my colleagues and make progress together ." After hearing this, he nodded and said, "You have made the right decision ....... Blabala does not catch a cold either. He asked me again: "Why do you want to join Baidu ?" I said: "I am very interested in Internet technology. I have been interested in data structures and algorithms since my undergraduate course.
In addition, Baidu is very technical and has a lot of people who want to do research and development in the future. Joining Baidu can get a good workout and learn a lot. Baidu is developing rapidly and is very helpful to its career ." Then, he asked me, "Do you know about search engines ?" I said, "I didn't know about it before. I learned about it after listening to the forum ." He asked: "Do you know about natural language analysis and processing ?" "Don't understand", I am so sweaty that I don't understand it at all, and I have a bad feeling. Who knows, even more depressing. He went on to say, "Your projects are all about network security. What is wrong with our work ?" The thing that worries me the most has finally happened. I say calmly, "well, there are both network security and network application and management ." Then the facial officer said, "Well, my problem is similar. Do you have any questions to ask ?" I looked at the table below, but it took me 30 minutes to finish it. It seems that I am not in the right direction. He is no longer interested in me, the two sides must have crashed. You have to ask questions that interest you. I will immediately ask him about the algorithm involved in the graduation design network Wuzi game of my undergraduate course to see if he has any optimization methods. He thought for a while and said, "This problem is a bit complicated ." I like it, haha. Isn't it hard for you? Then he said, "How did you do it ?" I thought, you did. I threw the problem back to me. I spoke about my practice at that time and I was also recognized and praised by him. Well, the first step is to achieve the goal.
Then, I asked him what kind of requirements he had for my position? "A good foundation for algorithms and data structures is the most important," he said ." I asked: "What about the database, scripting language, and network programming ?" These are all my weaknesses. He said: "There are a lot of ready-made results that can be used directly, and algorithms and data structures may be difficult to improve. Therefore, a good foundation is needed ." After hearing this, I was a little happy. My strengths are algorithms and data structures. Since weaknesses are not very important, they seem to have little impact on me. This reminds me of Lee Kai-fu's sentence: "When you get into MS, you understand C # very well. It doesn't matter if you don't understand it. You can learn it when you come. But if you don't know how to learn it, it's too bad ." It seems that the basic and learning capabilities are valued by many large companies. Then I chatted with the facial officers about the Wuhan Institute of Technology.
Changes, and the lives of reading and researching in Huazhong Science and Technology. Finally, the facial officer said, "In fact, your technology is still good ." After listening to this sentence, I am very happy, but I am not familiar with the search engine and I am not professional, and I am a little worried. Finally, I asked, "Will there be three more ?" "Maybe ." And vice president say goodbye.

[Postscript] The second is a long wait (in fact, it has been waiting for six days, but I think it has been a long time ). There was no message during this period. BBS said that when the two sides passed, they would send an offer, but the two sides would not go on three sides. I have reserved my opinion on this. Many of my big cows have gone to three sides, and the three sides are non-technical aspects. I have asked you about your expected monthly salary, I think we should have had three chances after two. I have never waited for three phone notifications, and I feel like I am suspended. During this period, she complained to LP, and comforted me and said, "Maybe, as BBS said, if the two sides are over, there will be no three sides. It's useless for you to be in a hurry. Please review the news ." Although it is comforting me, it is quite good for someone to complain in the waiting days. He contacted the person who pushed the push and said that he did not know the result and asked me who met me. I said I was bald, and I reported the name of all-in-one. "The bald head is their department manager," he said ." I'm surprised.
Ah? Department Manager? I can't see it. Since all the department managers have made me face-to-face, the chances should be quite big. I feel a lot better than the two sides. If you visit BBS every day, you will not only see the white clouds, but also the mountains and rivers. Waiting is really a kind of torment. Although all aspects of information are moving toward the negative side, you still don't have to worry about it. If you don't send an offer in a day, you still have a chance. If you don't believe it, you still have hope. Wait. I finally offered an offer one day before the National Day! Looking back at this Baidu journey, I feel lucky. On the one hand, it is a department manager. In fact, it will not be a big problem if it passes through him. On that day, I was in a super-good state, inspired to appear from time to time, and played well on-site. I finally passed the first level. Second, when the situation is very unfavorable (even a few "do not understand"), you can find additional projects for yourself and lean toward the requirements of your position. Since algorithms and data structures require high requirements, I have to show my own advantages in this aspect.
The algorithm design and facial chat show that you are interested in this aspect, and the foundation is not poor. It also highlights other advantages of itself, such as being motivated, studious, and paranoid about technology (classic saying of Baidu's System Department boss. I think another thing to do well during the interview is that when you face a problem that you don't have any ideas, as long as you have any new ideas, don't worry about whether the idea is feasible or not, whether it can solve the problem, first, let him talk about the problem and make him feel that you have a strong ability to think about problems. Don't think about it for a long time. The facial recognition will be very bad if you say "I don't know. Although your idea may not work very well, as long as you are moving in the right direction, you can pull it and the interviewer will give you some guidance. You keep thinking in that direction, and you may soon be able to solve the problem.
In the past, I used to look at others' experiences and benefited a lot. This time I wrote and wrote my own experiences and hoped to help everyone. Finally, I hope everyone can find a job that they are satisfied with. In fact, the payment is directly proportional to the harvest. I am very happy to be able to do my favorite job. The correct goal and preparation direction may be one of the most important factors for my success in this application. I only invest my resume in R & D positions, but I did not invest in companies that do not engage in technology. No matter how good the company is, such as P & G, Mars, state-owned enterprises, and civil servants. First, I don't want to take advantage of other people's opportunities. Second, I know that I am more suitable for technical development. I may not be able to go to a non-technical company as well as a technology company. Well, I am so tired of writing it. I hope it will be useful to you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.