Summary and Sharing of JAVA Interview Questions for Alibaba, Baidu, and Many Large Companies

Pay attention, don't get lost! If this article is helpful to you, don't forget to like and support!

I have interviewed nearly ten companies and got a few offers. Now that the interview is over, I will briefly summarize my interview experience.

My main direction now is Java server-side development. I will share with you the problems I have encountered, and also talk about how the technical staff can improve themselves in a targeted manner.

Problems encountered in the interview

Baidu

 

Java interview records and summary of companies such as Ali and Baidu

Baidu has interviewed twice, namely Baidu Nuomi and Finance Division. At present, Baidu only has recruitment positions in these two departments that match me. The interviews are all at Baidu's new headquarters in Xierqi. The park is still under construction, and it is far from the subway, so a taxi is required.

The interviewer brings his own computer, and the entire interview process is recorded. First, he asked in detail about the structure and job content of a recent job project. The interview was mainly expanded around the components and middleware technology used in the job to examine the degree of mastery.

File structure of MySQL InnoDB storage

How is the index tree maintained?

Possible problems with database auto-incrementing primary key

How to solve the problem of concurrent competition in Redis

Know the CAS operation of Redis transaction

Analyze the realization principle of thread pool and thread scheduling process

Several ways of dynamic proxy

Implementation of Spring AOP and IOC

Why can CGlib implement proxy for interfaces? RMI and proxy mode

Dubbo's underlying implementation principle and mechanism

Describe the detailed process of a service from being published to being consumed

In terms of algorithm, a simple in-situ deduplication problem of an array was examined, and it was implemented by discarding the tail elements of the array.

Baidu Finance’s interview was arranged on Saturday. On the one hand, the interviewer was very good and had a serious attitude. Some questions had no ideas and would give you tips. The communication was good. On the
other hand, I was told that I lacked financial payment background, but I worked for less than two years. For the newcomers, I think the main reason for being Passed should be that they have relatively little work experience and a poor education background.

Questions in the interview:

How to do service governance in distributed systems

The concept of interface idempotence

How to resolve version conflicts in Maven

JVM garbage collection mechanism, when to trigger MinorGC and other operations

The memory recovery strategy of the young and old generations

The proportional distribution of Eden and Survivor, etc.

The difference between Synchronized and Lock

Two interviews, I feel that Baidu’s process is relatively strict, and the interviewers are pretty good, simple and reliable

Alibaba

 

Java interview records and summary of companies such as Ali and Baidu

Ali's interview was arranged very quickly, and this time it stopped in two ways. Both rounds of interviews were all phone calls. I heard from friends that Ali has five rounds of interviews, four rounds of technical and one round of HR. Technical interviews are cross-interviews by several colleagues in the department, and I have also learned.

On the one hand, the project architecture, Java foundation, JVM, concurrent programming, database operations, middleware technology, and Dubbo service governance framework are generally developed. It may be because of the cloud security department. Half of the time is investigating the JVM, and some questions about compilation optimization After the completion of the knowledge, the two sides were arranged soon after the completion of the first side. On the other side, the problems on the second side were more in-depth, the problems were more thorough, and more attention was paid to the understanding and grasp of some technical details.

For example, for database operations, the interviewer will ask you in detail how the process of inserting and deleting a piece of data in the database is performed at the bottom. The project is configured with read-write separation, and will also discuss the implementation method and the underlying logic in more depth.


I hope it will be helpful to everyone. If it is useful, please give me support!

The above 2020 Alibaba interview highlights are organized into document notes. We have also compiled some information on interview & some of the manufacturers of the interview Zhenti latest 2020 collection (both documenting a small part of the screenshot), there is a need can click to enter signal: CSDN .

Some issues worth recording:

JVM memory generation,

Java 8 memory generation improvements

In-depth analysis of Classloader, parent delegation mechanism

JVM compilation optimization

Understanding of the Java memory model and its application in concurrency

Reordering instructions, memory barriers, etc.

Concurrency of HashMap

Know the application of LinkedHashMap

What design patterns have been encountered in the work and how are they applied

Since Ali Hangzhou's current social recruitment is P6, there is a gap between self-feeling and job requirements. On the other hand, I communicated with the interviewer on the phone and did not participate in the subsequent interview.

In the two interviews, Ali left a good impression on me. The interviewers were all big cows. The day after the interview, I received Ali’s email rejection and praise.

Most of Ali's jobs are in Hangzhou. After the interview, I paid special attention to the cost of living there. At present, the average price of a house in Hangzhou is less than 20,000. Compared with the house price in some counties and cities in Zhejiang, it is more than 20,000. The house price in Hangzhou should be relatively normal.

If you get high salaries from several Internet companies such as Alibaba and NetEase, buying a house and life is indeed much easier than in Beijing, and decisively decides to settle for a period of time. Two years later, P7 will fight again.

Youku Tudou

 

Java interview records and summary of companies such as Ali and Baidu

Youku’s interviews are two-to-one, with two interviewers in each round. One side is relatively smooth, mainly Java basics, Spring principles, JavaNIO, concurrency and collection frameworks, etc. It may be because of the video website. Youku has a lot of knowledge about network principles. , Such as TCP/IP protocol, long connection and short connection, etc.

On the one hand, I mentioned that I might learn about big data and machine learning in the second half of the year. On the other hand, I stumbled on this and asked a lot of questions about massive data.

TCP/IP protocol

Long and short connections

mapreduce process

Time complexity of multiple merge

Massive URL deduplication problem

Java NIO use

The principle of inverted index

Understanding of word segmentation technology

A specific scenario was given in the interview to examine the understanding of the MapReduce process, such as how the Map phase and the Reduce phase are performed. The Reduce phase interviewer hopes to analyze the time complexity of a multi-channel merge, and the knowledge of external sorting is simple After analyzing it, the answer was not very good.

After I came back, I searched for the optimization of the winner tree and the loser tree, and found that there was quite a lot of content inside, and I deeply realized that some knowledge points are difficult to grasp if they are not comprehensive and deep enough.

Sohu News

 

Java interview records and summary of companies such as Ali and Baidu

Sohu's interview waiting time is relatively long.

I did a written test. On the one hand, I was an interviewer of my age. I asked some basic questions about the written test and resume. The chat was quite speculative. On the other hand, the technical manager was more inclined to the application of architecture and middleware, and asked questions about the project. The problem of using middleware such as service governance and message queues,

How message middleware solves the problem of message loss

How to deal with the failure of Dubbo service request

Will the reconnection mechanism cause errors?

Understanding of distributed transactions

In-depth analysis of several design patterns

At the end of the interview, I asked a question about converting a variable-length string to a fixed-length string. I just interviewed Youku. This simple question was complicated by me. I didn’t get the interviewer’s point, considering uniqueness, performance, etc. A lot.

I also remind everyone that you must stay awake during the interview and don't have a fixed mindset. Unless it is a low-level R&D position, it is not particularly difficult for social recruitment to investigate the algorithm, and you can solve it with normal thinking.

other

 

Java interview records and summary of companies such as Ali and Baidu

It is worth mentioning that the interview process of a startup company is very simple and rude.

Without self-introduction, the interviewer asked a multi-thread scheduling question on the whiteboard after reading the resume, and passed the MAC and began to code. After I finished writing, I said that the topic was of little significance. I asked Redis and asked to implement an LRUCache in fifteen minutes. Then I wrote the code on the spot again.

Halfway through the writing, the interviewer interrupted after seeing that there was no problem, and asked what he wanted to know about the company. After a while, I would go back. I was just Passed. The startup company is really efficient (here/dog face).

Stay awake during the interview. For example, when you are asked about 100,000 ip segment search, the first is a typical search question. Once you know this, you can choose relevant algorithm implementations, such as binary search and binary search tree. Wait.

It is recommended to draw and express.

The structure of the projects that have been done, the design and realization of various frameworks and middleware can be well explained by drawing pictures. You can carry paper and pen with you. The interview is a good learning process, and some questions can also be recorded. Come down.

Generally speaking, the interview process is similar to a wayfinding algorithm. If a certain point of interest of the interviewer is mentioned in the communication process, it will start on this point, and then keep asking questions until you can’t answer it, or you are particularly skilled in this field. Kill the interviewer directly, so that a route goes through, and then change to the next route.

How programmers improve their skills

Compared to programmers, I prefer the name Siege Lion. Programmers have been labeled with various labels in the eyes of people who don’t know the industry, such as various houses and uncut edges. In fact, writing code is really high-end. Is the grade good?

It's still talk about how to improve the technical level of Gong (cheng) Cheng (xu) Lion (yuan) and enter the target company.

Generally speaking, mainstream Internet companies are using relatively mature and popular technologies in the industry. The easiest way is to look at the recruitment requirements. Although most companies’ Job Descriptions are suspected of plagiarism, compare a few more recruitments. It is still possible to understand the technological direction of mainstream Internet companies.

Let's take the familiar Java server-side business development to illustrate, and find a few recruitments on the hook:

Baidu's core business departments:

 

Java interview records and summary of companies such as Ali and Baidu

Alibaba:

 

Java interview records and summary of companies such as Ali and Baidu

Meituan Hotel Division:

 

Java interview records and summary of companies such as Ali and Baidu

Since it is a social recruitment, a certain amount of work experience is necessary, more than three years is the best, and it is also reflected in the above JDs. So if you want to go to a big company, personal advice, accumulate 2-3 years of experience in a small company and start to change jobs.

Suggest

1. The basic knowledge must be solid, including language foundation, computer foundation, algorithm and basic Linux operation and maintenance. For
the Java language, it is necessary to deal with collection classes, concurrent packages, IO/NIO, JVM, memory model, generics, exceptions, and reflection. Have a deeper understanding, it is best to have learned part of the source code.

These knowledge points are interlinked and can also be reflected in interviews. For example, the collection of HashMap, from the point of view of the source code, can go deep into the realization of the hash table, the method of solving hash collisions other than the zipper method, and how to balance the guarantee of the internal array The performance of the hash table will not decrease, etc.;

From the perspective of thread safety, it can be extended to other data structures such as HashTable, ConcurrentHashMap, etc. You can compare two different locking methods, the implementation and application of RetreenLock, and continue to investigate Java memory models, Volitale primitives, memory fences, etc.;

Horizontal expansion can examine ordered Map structures such as TreeMap, LinkedHashMap, and then examine knowledge of red-black trees, LRU caches, and HashMap sorting.

Intermediate and senior positions in the Java direction will pay more attention to the mastery of virtual machines, such as class loading mechanism, memory model, etc., which are very important in program optimization and concurrent programming.

In terms of algorithms, basic sorting and search algorithms, mastery of ideas such as recursion, divide and conquer. If the algorithm foundation is not very good, recommend "Programming Pearls" etc., each chapter is very classic.

In addition, knowledge of computer basics, such as TCP/IP protocol and operating system is also necessary. These are basic courses for university computer majors, and they are also basic qualities for development.

2. Design patterns, the ability to make wheels, various caching and database applications, caching, middleware technology, high-concurrency and high-availability distributed system design.
Large Internet companies face a large number of requests every day, and they will examine the distributed system Architecture and design, how to build a high-concurrency and high-availability system, and because the user base is relatively large, a subtle optimization may bring great benefits, so the mastery of some technology stack requirements are relatively deep.

For example, for MySQL database, you need to know the relevant configuration and optimization, how to divide the database and tables after the business comes up, and how to configure the cache reasonably. An experienced server developer should also be a competent DBA.

You must have a certain understanding of commonly used development components, such as middleware, RPC framework, etc. Although we may not use our own wheels in our work, we will be handy if we master the principles.

This part of knowledge is mainly based on work accumulation. I recommend "Large-scale Website Technical Architecture and Java Middleware Practice", as well as "Large-scale Website System Architecture and Practice" by Zeng Xianjie, which covers the evolution of large-scale websites, service governance and the use of middleware. Very detailed explanation.

As a business developer, it is necessary to understand the indicators related to stress testing, such as QPS, average user waiting time, etc., which can help you better understand your system.

3. Soft indicators, including fast learning, good communication skills, and understanding of related industries

Company job fairs value a person’s learning ability, whether it is worth training, and the salary of graduates recruited by many companies will be upside down for old employees who have worked for many years.

Communication habits and logical analysis skills are all soft powers, which are difficult to improve in a short period of time and require long-term development and continuous investment.

Many companies also value their industry. Although it is doing business, it is also important to understand the product and industry.

For example, for positions in Internet finance companies, if you have payment and banking-related system development experience, you will definitely get points. This is related to everyone's long-term planning.

 

Java interview records and summary of companies such as Ali and Baidu

Once you have a direction, the next step is how to improve and talk about your own feelings.

In many cases, unless your job content is to deal with scenarios such as high concurrency and a large number of users, it is actually difficult to improve through overtime or repetitive work.

The most direct way for technical staff to improve is to jump out and examine themselves outside of work, such as reading technical books extensively, going to forums to communicate with various talents, understanding the technology stacks of mainstream Internet companies, and learning and learning in a targeted manner. To understanding.

At the same time, you can also properly understand some product or design knowledge, and use a little bit to show the surface. Compound talents are definitely more popular. When dealing with interviews, you should show your usual side like dating a girl.

Code changes the world, and if you want to become a big man of tomorrow, the burden on programmers is very heavy.

 

This is the end of this about article!

Pay attention, don't get lost! If this article is helpful to you, don't forget to like and support!

 

The answers to the above interview questions are organized into document notes. We have also compiled some information on interview & some of the manufacturers of the interview Zhenti latest 2020 collection (both documenting a small part of the screenshot), there is a need can click to enter signal: CSDN .

I hope it will be helpful to everyone. If it is useful, please give me support!

Guess you like

Origin blog.csdn.net/SQY0809/article/details/108578603