Ali finally lost on 4 sides, and then joined JD.com with Tsinghua P8 6+2 route and 100 major knowledge points

The material of this article comes from a fan sharing experience, I hope it can be helpful to everyone.

Maybe every programmer has a big factory dream, and I am no exception. Recently, I am preparing to change jobs. Some time ago, I was preparing for various interviews, and I also interviewed several major manufacturers, including Ali, Pinduoduo, and JD.com. But in the end, I still hung up on Ali in the fourth round. This article summarizes my four-round interview experience in Ali, hoping to inspire and help everyone.

There are generally four to five rounds of recruiting at Alibaba. My process this time is the first round of technical interviews, the second round of coding, the third round of boss interviews, the fourth round of boss interviews, and the fifth round of HR interviews. However, I couldn't chat with HR.

image

Ali side

Let me introduce myself first?

The technology used in the competition?

What are the collection classes of Java? Talk about List, Set, Map in detail

What is the difference between ArrayList and HashMap? How does HashMap resolve hash conflicts? How many types of hash conflict solutions are there? hash function?

What are the characteristics of red-black tree? Tell me about TreeSet? Application scenario?

Do you understand CocurrentHashMap? Tell me about the bottom layer and the locking mechanism in detail? application? The difference with HashTable?

The difference between StringBuilder and StringBuffer? Talking about the bottom layer and their respective application scenarios

What are the locks in Java? Biased locks, lightweight locks, heavyweight locks, Lock bags, etc. have all been talked about

The difference between synchronized and Lock? ReentrantLock?

What are threads? Thread process difference? How many ways are there to implement threads?

Do you understand the thread pool? How to create thread pool? Which way is better to create? Talk about the working principle of the thread pool? Denial strategy?

The difference between sleep() and wait()?

Do you understand the IO model? BIO, NIO, AIO?

Quick sort and stack sort? time complexity? If the amount of data is very large, if you want to sort it, the performance of direct quick sorting is not good. How to optimize it?

What are the OSI models of computer networks?

The difference between TCP and UDP? Application scenario?

Tell me about the memory model of the JVM? Runtime data area?

What garbage collection algorithms do you know? What is the difference between reference counting and reachability analysis?

What is an index? The role of the index?

InnoDB underlying structure? The difference with MyISAM?

Assuming that the sql statement needs to be optimized, which aspects are generally used for it?

What are the types of transaction isolation levels? What problem do they solve? current read and snapshot read? MVCC mechanism? undolog?

What about the optimistic lock and pessimistic lock of the database? Implementation of optimistic locking? next-key lock?

Does Spring understand? Talk about IoC? AOP? JDK dynamic proxy and CGlib? project application?

What is the default scope of beans created by Spring? Will there be a problem in the case of concurrency? Mentioned threadLocal, and talked about how to use threadLocal in my own project. Then ask what is the problem with threadLocal? I thought about it for a long time at first, but I didn't expect it. It was embarrassing to pause for a while. Fortunately, I remembered that the memory leaked. Here I recommend an architecture learning and exchange circle to everyone. Exchange learning guidance pseudo Xin: 1253431195 (which contains a large number of interview questions and answers) which will share some video recordings recorded by senior architects: there are Spring, MyBatis, Netty source code analysis, high concurrency, high performance, distributed, micro-service architecture The principle of JVM performance optimization, distributed architecture, etc. have become the necessary knowledge system for architects. You can also receive free learning resources, which are currently benefiting a lot

asked rhetorically. If you want to enter your company, what shortcomings do you need to improve?

The interviewer was very nice and pointed out some basic deficiencies. It is true that I did not answer this question very well. I am very grateful to the interviewer teacher who guided me to answer the questions. The interview experience was very good!

Ali's two sides

Self introduction

Talk about the project, dig deep

Tell me about Spring IoC AOP, the principle of AOP? Where is it used in the project? MyBatis? How does the Dao interface work? Speaking of AOP

Talk about Redis in your cognition? RDB, AOF? How to use Redis in the project, talking about the implementation of an asynchronous event processing framework, I feel that the interviewer basically digs deep into the project throughout the process.

Know about RabbitMQ? zookeeper?

rhetorical question

The second side is basically to ask some knowledge about partial frameworks and middleware, and to dig deeper into projects. The interviewer talked patiently and kindly throughout the whole process. It felt like he wanted to find out my highlights. In short, the experience was very good! Thank you very much for the second interviewer teacher!

Three sides of Ali

JVM compilation optimization

Understanding of the Java memory model and its application in concurrency

Instruction reordering, memory fences, etc.

OOM error, stackoverflow error, permgen space error

JVM common parameters

tomcat structure, class loader process

The semantics of volatile, must the variables it modifies be thread-safe?

The difference between g1 and cms, garbage collector selection for throughput priority and response priority

Tell me about your understanding of the environment variable classpath? If a class is not in the classpath, why is a ClassNotFoundException thrown, and how can the class be loaded correctly without changing the classpath?

Talk about strong references, soft references, weak references, phantom references and their relationship with gc

zookeeper principle and applicable scenarios

zookeeper watch mechanism

How to deal with redis/zk node downtime

How to achieve a unique serial number in a distributed cluster

How to make a distributed lock

Which MQs have been used, how to use them, and what are the advantages and disadvantages compared with other MQs? Is the MQ connection thread-safe?

How to ensure that the data of the MQ system will not be lost

List the database sub-database sub-table strategies you can think of; after sub-database sub-table, how to solve the problem of full table query.

The strength of the three aspects has been significantly improved, mainly involving multi-threading, JVM and distributed architecture. It seems that many programmers’ short boards are distributed. Although I am the same, I still answered under the guidance of the interviewer. ok, thanks a lot! ! !

Ali four sides

The four sides are more difficult. The interview with the department manager is centered on two parts. The first is to propose loopholes based on my project and let me solve them; the second is to set the scene by himself and let me give a solution.

The first one is relatively simple, mainly due to the second aspect. Because I don’t know much about e-commerce projects and don’t have enough experience, I felt that it might be cold at that time. Sure enough, I saw the reply message in the email in the next few days: Your professional experience is slightly different from the requirements of this position...

Can you answer these questions?

The author will give you a brief analysis of this fan’s Ali interview process:

1. In social recruitment interviews, the technical questions are relatively more in-depth, so it is still necessary to understand some source codes, such as the principles of multi-threading and high concurrency, which are often asked. Not to mention the JVM, it is almost a must.

2. All questions are based on specific scenarios. Generally, big manufacturers will ask you questions based on specific scenarios, so you can only do it purely in theory. You also need to know why this technology is used and how to achieve high availability, etc. wait.

3. In future interviews, you will basically be asked to write codes. To hire a software development engineer, you can’t just talk about it. This requires you to take time to practice more. I mean practicing algorithm questions, not that kind of business code.

With Ali’s failed interview experience, I finally realized the importance of systematic learning without leaving any shortcomings, and started to make up for the 6+2 learning route of Tsinghua’s sweeping monk-level masters, consolidated my foundation, marched to JD.com, and finally got an offer ! ! !

6 knowledge points:

Multi-threaded high concurrency + JVM tuning + design pattern + Redis + Zookeeper + MySql tuning

Two major projects:

Online car-hailing + billion-level traffic

Practical Java high-concurrency programming design

image

In the era of single-core CPUs, a single task can only execute a single program at a time point. With the development of multi-core CPUs, parallel program development has become particularly important.

This article mainly introduces the basics, ideas, methods and actual combat of parallel programming based on Java.
First, based on the foundation of concurrent programs, introduce the basic methods of Java's parallel program design in detail.
Second, it further introduces JDK's powerful support for parallel programs in detail to help readers quickly and steadily develop parallel programs.
Thirdly, the optimization of "lock" and the methods and ideas of improving the performance level of parallel programs are discussed in detail.
Fourth, introduces the basic design patterns of parallelism, and the support and improvement of parallel programs in Java 8/9/10.
Fifth, introduces how to use the high concurrency framework Akka.
Sixth, the debugging method of parallel program is introduced in detail.
Seventh, analyze the Jetty code and give some examples of its high concurrency optimization.

Advanced JVM Features and Best Practices

image

image

Currently commercially available high-performance Java virtual machines provide a considerable number of optimization parameters and adjustment means to meet the performance and stability requirements of applications in the actual production environment. If it is just for getting started learning and let the program work normally on your own machine, then these features can be said to be dispensable; however, if it is used for production development, especially large-scale, enterprise-level production development, it is urgent At least some of the developers need to have a clear understanding of the characteristics and adjustment methods of the virtual machine. Therefore, in the Java development system, there has always been a great demand for roles such as architects, system tuners, and senior programmers. Learning the principles of various automatic operating features in the virtual machine has also become a lesson that Java programmers will eventually come into contact with on their growth path. Here I recommend an architecture learning and exchange circle to everyone. Exchange learning guidance pseudo Xin: 1253431195 (which contains a large number of interview questions and answers) which will share some video recordings recorded by senior architects: there are Spring, MyBatis, Netty source code analysis, high concurrency, high performance, distributed, micro-service architecture The principle of JVM performance optimization, distributed architecture, etc. have become the necessary knowledge system for architects. You can also receive free learning resources, which are currently benefiting a lot

Detailed Explanation of Zookeeper Distributed Process Collaboration Technology

image

image

Building distributed systems is not easy. However, most of the applications people use daily are based on distributed systems, and the status quo of relying on distributed systems will not change in a short period of time. Apache ZooKeeper is designed to ease the task of building robust distributed systems. ZooKeeper is designed based on the core concept of distributed computing. The main purpose is to provide developers with an easy-to-understand and develop interface, thereby simplifying the task of building distributed systems.

Online car-hailing project

image

Project Architecture Diagram

image

Multi-threaded, high concurrency, distributed architecture, JVM tuning, these high-frequency interview documents and learning materials such as online car-hailing, billion-level traffic project actual combat, etc., will help you improve more systematically and advanced, and do not leave obvious shortcomings , because that would be your fatal flaw.

**The author has helped you pack and organize these documents, and friends who need to learn more

When you suddenly get stuck in the interview and can’t answer, what good solution is there, and then share it with your friends. It’s just the author’s personal opinion. If there is anything that feels inappropriate, please leave a message to communicate. The author will accept it with an open mind. Let's exchange learning and progress together~~~

1. Keep calm and gather information

2. Put an end to silence and express appropriately

3. Dodge questions and show yourself

4. Consolidate yourself and pursue excellence

Keep calm so that we don't get confused, and then carefully analyze the meaning of the interviewer's question to see if it is a misunderstanding. Make a good impression on the interviewer.

In the end, you still have to improve your internal strength, pursue the ultimate core principle, and combine theory with actual combat to achieve your dreams! ! !

image
image

Guess you like

Origin blog.csdn.net/muli522/article/details/124770777