Baidu business search

Source: Internet
Author: User

Java from the business Search Department at the Baidu Shanghai R & D center on the 12th caught a cold orz (lethal ......). I heard from my colleagues that my post was tight this year. If I had entered the post last year, it would have been quite mysterious. If you don't know how to use it, you can't just write it for your reference.

 

Zhang Jiang is a very interesting place. His path names are XXX scientists, Newton Road, and zuchongzhi Road. There are still tram-like means of transportation on the road, and Baidu is at Zhangjiang Microelectronics information port, No. 690, BIBO Road. It should be a place where it enterprises gather.

 

The interview was held at about two o'clock. I reported to the front desk at half past one, but I didn't see any pretty girl at the front desk (Disappointed ~~). Report the name of an interviewer. Soon the interviewer came over with his notebook and took it to a small room. The entire interview did not involve computer training. It may be a professional habit, but I feel that I can bring some project demonstration materials. If the other party is interested, I may be able to present the demonstration.

 

One face is very young, his face is round and fat, and he can speak very politely, but he always feels that he is not revealing it. (Baidu's interviewers are very friendly, and the overall interview atmosphere is relatively relaxed, but I can't guess what they think about orz ). He said, "Let me introduce myself first: My name is XXX. It's up to you ." (I thought he was going to introduce him for a few minutes .) I spoke about my experiences in competitions and projects. I have participated in noip before and I mentioned that he has no major response. It seems that it is of no use to the interviewer ~ Then I asked about the Java basics and projects. I can't remember them. I mentioned the GC mechanism. I am not very interested in the project ~~

 

Then I started to do the question. The first question is about querying the remaining ticket of a train ticket. It is required to determine how to obtain the remaining ticket count as soon as possible. Because it is the first question, I don't know the depth of the issue, and the demand is not too clear :(. The first thing that comes to mind is the interval chart or something. I have introduced a scanning line method. The interviewer does not seem to understand what I mean, but he gave me some examples to say that this method is not good. I think what I want is not a way of thinking. He should be wondering how I think about this model... this question was suddenly lost. (when I came back, I thought that I would use binary numbers to store the booking status of each seat, and I would use bitwise operations to check the ticket. Maybe it's the right way ), orz should be the worst answer for this interview, but I didn't think it was a hit ~

 

The second question is to find an integer sequence and the largest subsequence. In fact, it is a very basic question. I have no choice but to touch the algorithm for many years. I started to talk about an O (N ^ 2). On the one hand, the company quietly said "the best algorithm is linear", so we thought of a greedy Recursive Method and wrote a recursive formula. The interviewer said "It's so simple "~~ I feel that this type of algorithm question is not complicated as long as I want to be familiar with it. Therefore, do not think too complicated or think about Optimization of a frustrated method.

 

The third question is to find the total number of Reverse Order pairs of a sequence. The interviewer may find that I think too much. When I give a question, I will say "The answer is O (nlogn). If it is linear, don't think about it ". I know that this is a binary method. However, the brain is still not fully enlightened, saying that we should first sort the two self-sequences in a linear base sequence, and then merge the sides in the same way as the merge sort to calculate the reverse order logarithm. The interviewer said, just merge, sort, and make statistics? I said, oh, it is... Alas, the algorithm is too unfamiliar. It is estimated that the interviewer heard me mention merging and sorting. What else do I say with linear sorting ~ Then he asked me to write a code implementation (hand-writing), saying that I didn't need to consider the details and boundary conditions. I thought I was just writing a thought, and I wrote a pseudo code... as a result, he said he had to rewrite the code... looking back, this is actually looking at the code style. He said that it is not necessary to consider details, but it is actually looking at details ~~

 

It's been almost an hour since we have met each other. As soon as the officer was there, he began to ask about the first time. It seems that he thought it was a long face... the two sides looked very cool, face-to-face, and spoke kindly. They kept taking notes and kept a full record. It feels a bit like an orz. I also asked the basic questions about the project and Java, but it is more detailed. I spoke about the ESP architecture and some technical details, green JVM and bytecode encryption (or the project is relatively easy ~). Java has asked the equals method, hashcode, and hashmap implementation, which is indeed very basic. I also asked some other questions about SQL and Linux ~~

 

The two questions are no longer pure algorithms and are close to applications, mainly related to massive information processing. First, you can retrieve a specific URL from a list of massive URLs. I am talking about block-based index building. I first locate a block and then look for it one by one (I feel this type of problem is basically a distributed idea ). Then I asked how to intelligently prompt based on the first few characters. I said index based on the first few characters and sort the data. To put it bluntly, that is, sub-governance, indexing, and sorting. I don't know whether he is satisfied or not. It took nearly an hour for the two sides, and then the two sides went to the three sides.

 

The three officers are department managers and have more than 40 duck eggs. However, the maintenance is good and there is no shelf. Like an old urchin, when I was thinking about a problem, he was still kneeling in the chair and turning around to play orz. I first asked a lot of questions about my personal experience, including career orientation and past experiences. I feel like I am investigating my motivation. The problem of the three sides is closer to the users, focusing more on Data Mining. It is obvious that it is related to the Department's functions, rather than simply technical issues.

 

First, I asked the Shanghai metro system a lot of inbound and outbound records every day and how to estimate the actual traffic on each line. I am talking about the point-to-point shortest path problem. I also asked how to select multiple paths. I would like to add some weights based on relevant factors. I also asked which factors are influencing the performance. I would like to cite more than 10 orz, which is very divergent. Later, I simply told them how to persuade advertisers to put advertisements on the subway. Why did it become a sales recruit for programmers? It seems that business search is still very important to the business mind ~~

 

Then I asked a kind of positive and negative unbalanced coin. How can it be used for fairness? I used two numbers, one being positive, two being opposite, and one being opposite to two. The other two situations were abandoned. He said yes (at this time, I thought the idea was quite wrong, I don't want to think about it as I do). I also asked if I knew that the positive and negative probabilities were, but I couldn't give up any situations. How can I deal with Bo? I would like to get a few more, and combine the probability of a variety of situations into a sum that is exactly equal to 1/2, he said this idea is correct (although it seems like there is a problem orz after coming back ).

 

Finally, I asked about the 1000 drugs. There was only one effective drug, and only a batch of experiments were conducted. I asked how many mice needed to identify the effective one. I will write 1-as binary. When the first digit is 1, I will inject the first digit to determine whether the effective one is 1 or 0, so as long as 10 (but every time you get 100 needles or Z, it's so abnormal ...), he said yes.

 

It took about three hours for the entire interview. Big companies are indeed different. There are still many lessons in the process, and I hope it will be useful to you. Still waiting for the result, bless ~~

Related Article

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.