I have 3 years of experience in development and started to look for a job at the end of last year. With full preparation, I started to look for a job in May. At the beginning, there were many rejections, and finally I got the offer from Baidu in early July! I have interviewed a lot of companies, and I feel that most of them have similar points of investigation, so I write down my own experiences, hoping to provide some help to my friends who are looking for or preparing to find a job.

As a reading benefit, I also sorted out my review materials, including interview questions of various big companies + high-frequency interview questions. If necessary, I can [Click here to】 to receive

One side

Projects: 1, find a project, introduce the situation. What are the problems encountered and what are the solutions for each problem?

Algorithm problem: 2, a sorted array, find out the sum of two numbers m of all combinations 3, sequence of natural numbers, find any continuous sum is equal to n of all subsequences

Data structure: 4. Find a data result set from the database, which has a time field, please use a data structure to store the records in a certain period of time can be found the most quickly. 5. I mentioned B+ trees in the previous question, so he asked me why I use B+ trees for indexing instead of binary trees

I have described the four standard levels and the three levels implemented by Oracle. I have also outlined the multi-version read consistency

Project related technology: 7, see the resume wrote a RPC, talk, I said with RMI comparison, said the similarities and differences, and then expanded to the memory allocation problem, but did not understand what he was going to say. Also the problem of Java client and C program server communication, such as C there directly a structure over, how to deal with, the answer has not encountered. How do you communicate with the server side and the browser side? How do you communicate with the server side? How do you communicate with the server side? In the end, however, it only falls to how the Java object is passed to the client and how the client data is passed to the server.

The wait and notify methods of Object are used in this class. The wait and notify methods of Object are used in this class

12. Do you know about Spring, the implementation of IOC and the implementation of AOP? What are the limitations of each scheme

Second interview

Projects: 1, introduce you do project, slightly high level introduction, the meaning is not endless Which mentioned the primary instance standby node cluster nodes and the main examples of singleton states how to synchronize two, RPC communication and rmi difference between article 3, concurrent access to the same data, how to ensure data synchronization. 4, website performance optimization have done what, specific? ETag, Last-Modified, Expires, Cache-Control 5. What book did you read recently and what impressed you the most?

Algorithm: 6, binary tree, find two nodes at the bottom of the public parent node, to train of thought 7, one-way linked list reversal, write code

Three sides (that’s all I remember)

Self introduction: 1, the basic situation of the individual, incidentally mentioned the project, began to pull a few database: 2, database performance optimization do? What did you do? Design: 3, the design of a small store inventory system table structure design, the boss every day to know the goods sold, to regularly check the cost of goods, sales and profits. One of the important things to note here is how to do the cost calculation. You need to know several methods of cost calculation. Choose one of them

Algorithm: 4, 1 to 100 million natural numbers, seek the sum of all the numbers after the split, such as 286 split into 2, 8, 6, such as 1 to 11 split after the sum of the numbers => 1 +… Plus 9 plus 1 plus 0 plus 1 plus 1.

Before going to Baidu interview, sorting out the interview questions. No written test, talk directly to the interviewer. I feel that the interviewer is very good and patient. After each interview, no matter the size of the company, no matter whether you can get the offer or not, you can basically have some valuable input. I am quite happy. Although I have four years of work experience, I am not a pure technical person. I have done development, maintenance, customer meeting and project management. Recently, I want to change my job.

I didn’t do well on the last few questions this time. In particular, there is a server session optimization and database table horizontal split strategy, did not mention the point, on the way back to have some ideas, back to Baidu, found that it is not the same. The first few algorithms are also bumpy, at least all said up, is not the optimal is not easy to say.

In the past, information systems paid more attention to the acquisition of business and the realization of functions. Although everyone called performance, architecture and so on, nobody actually cared about it. Anyway support dead also so a little person use. Internet companies are really different. The focus on concurrency and large amounts of data is deep in the bone. I feel so ashamed. Although in recent years, customers talk about the needs of PPT boast that it is also a mixed scene, but from the heart I hope I can go one step further in technology.

conclusion

Sorted as follows according to memory:

  1. I have a set A that has n positive integers, out of order. Given a positive integer N, what are the combinations of any two numbers in A that add up to N? Set for,3,44,2,4,5,54,222,368 {1}, for example, N = 6, the result set {1, 5}, {2, 4}
  2. There’s a similar problem on the website
  3. The implementation of TreeMap.
  4. All kinds of collection class structure and advantages and disadvantages, we quite love to test. Used to do industry information, there is no feeling, but if you are very concerned about performance, make clear or very useful.

3. There are two large files, each with 100 million lines, one integer per line. What is the intersection of these two sets. The given premise is that the machine does not have enough memory to fully load any one file.

  • This is almost the original question on the Internet

4. The definition of heap and stack, the objects in heap and stack, which one runs faster?

  • Also asked some derivative questions, remember clearly, as long as the Java textbook on this aspect of the introduction is enough

5. In order to realize a line chart, data need to be stored in a data structure. The abscissa of a line chart is time, and the ordinate is value. Select value from t where begin> ‘20110101’ and end< ‘20111212’

  • Again, the various collection classes in Java are essentially asking about the efficiency of various data structures on sequential/random reads/inserts
  1. What data structure is usually used for indexing a database? Why this data structure.
  2. I know it’s btree, but what’s wrong with btree? Why can’t I use other trees or other structures? I didn’t understand until I read a post. That’s learning.

If there are two tables in the database, select name, age from table A, name, unit from table B. Now use the name field for a LEFT JOIN query, assuming the name field is indexed. Ask how the database is implemented. If you want to implement a Left Join yourself, you can do this by looking at both tables as an array in memory.

  • I don’t know how to implement a leftjoin in the database, so I can implement it in memory by myself, but it may not be very good.

8. Various transaction isolation levels in the database

  • This is pure do not remember, in the previous work never used, really shame
  1. What do wait() and notify() do, and what are the restrictions on how wait() can be used anywhere?
  2. For someone who has never used multithreading, such a simple problem becomes a little harder. You only know what you’re doing, but you don’t know what the limits are
  3. There is a table in the database with hundreds of millions of data, how to optimize?
  4. Mainly split, in addition to split according to the business, what from the technical point of view, good scalability of the level split way
  5. The idea is to split the business, yes, but the interviewer is not asking about the strategy, but the technical considerations. Also have to consider the expansibility, such as after dismantling, the volume of data growth is rapid, and to dismantle, how to do. There are a lot of horizontal splitting strategies that you can find online. But t what I said is not very systematic, had not done before, is the scene to think.