Recently, when I was interning Boss Contact me , Said he jumped to Ali , Ask me if I would like to meet one Java Background development post .
Considering that I only worked for one year , Going to Ali now will definitely reduce your salary , So there's not much will . But from the perspective of self-improvement , Took part in the interview .
<> one side （ Telephone interview for one hour ）
Let's start with a brief self introduction , Mainly including school experience and work experience . I have only one year's work experience , Most of the time I'm doing product design and UI/UX
Design, So you can feel the interviewer on the phone shock.
Java Basics . How to realize the automatic disassembling box ,String,StringBuffer,StringBuilder Similarities and differences and their realization .
JVM Basics .JVM Memory model of , Common garbage collection algorithms .
affair ACID, How to guarantee transactions in programming , How to guarantee transaction in distributed situation .
I haven't been exposed to distributed scenarios , So the interviewer always induced me to design and implement a distributed transaction .
Optimistic lock and pessimistic lock of database . How to realize an optimistic lock .
Message queuing usage scenario ,Kafka Structure and principle of .
What is? restful api, and rpc What's the difference between calls .
Several ways to write a single example .volatile What is the function of keywords .
These are the general questions of telephone interview , After the interview , Three more algorithmic questions , Ask me to finish it in an hour , Here are three algorithms ：
Flip one long Type number . For example, input 123456L, output 654321L.- Leetcode Flip integer Varieties of . Investigate whether overflow can be handled correctly .
Enter a double, Ask to return the closest .49 or .99 The number of . for example 12.77 return 12.99,11.02 return 10.99,12.61 return 12.49.
There are three threads ABC Write to an array separately a,l,i, The final write result is required as follows alialiali… Number of writes by A Thread decision .
These three questions are well done , The interviewer contacted me the next day to elaborate on the first and third questions , Then inform me that I can take part in the next round .
<> Biplane （ Telephone interview for one hour ）
On the other hand, it mainly investigates some open-ended problems .
First of all, introduce yourself . Mainly after work experience . Introduce the work of one year team Products of , What responsibilities have I undertaken .
Open questions . How to design a rpc frame .
Open questions . How to design a service registry .
Collection class source code .HashMap How is it realized , Expansion process , Why expand to 2 times .HashMap Can I replace the list in with an array ? Is the time complexity the same ?
Collection class source code . Thread safe HashMap What is it? ?（HashTable and ConcurrentHashMap）ConcurrentHashMap How is it realized ?（Java7 Segmented lock and Java8 Of CAS+Lock） and HashTable What are the advantages over ?
Structure of Mangrove , What is the time complexity , How to calculate .
What is? CAS operation , How to implement a custom lock
Database design . There's a big one order surface , How to design to improve query efficiency （ At the same time, according to the buyer id And the seller id query ）?
It's about an hour on both sides , The interview went well .
ps. After one or two interviews, the interviewer gave all kinds of hints about whether I could accept the crazy overtime work blabla……
<> Three sides （ Telephone interview for an hour and a half ）
The third day after the end of the second side , I received three notices from the scene .
Three sides is a big Boss, So the interview questions are more about the ability to analyze problems .
What did you learn in a year's work ? What is the architecture of the project ?UI/UX What are the design specifications （ Because I said I learned something UI/UX Design method , So the interviewer asked ）?
Data isolation level , Visceral reading and unreal reading .
Thread pool principle .
Synchronized Implementation of , Lock upgrade process .
K8s The role of ,K8s The underlying architecture of .
I introduced some projects I did in my spare time .
What do you think you can bring to Ali ?
You need to endure a lot of difficulties to enter Ali , Need to face the difficulties , If the performance evaluation gets bad evaluation , What would you do ?
In general, the three aspects are smooth , The interviewer is kind .
The whole process lasted from one side to three sides 10 About days . in general , It's all within expectations , Although some distributed related questions were asked during the interview , I don't have any experience , Don't give up at this time , Take the initiative to say what you think , And then under the guidance of the interviewer , I believe you can say the answer .
last , It's some interviews I summed up Java The knowledge that the backstage engineer must master .
* Collection class source code
ArrayList： Internal data structure , Array expansion mechanism
LinkedList： Internal data structure , Why use double linked list
HashMap： Internal data structure ,put Complete process of the method , Capacity expansion mechanism
LikedHashMap： Internal data structure , How to implement a Cache
TreeMap： Internal data structure , Time complexity
CurrentHashMap： Internal data structure ,Java7 Segmented lock ,Java8 CAS+Synchronized
* Java Basics
Principle of automatic disassembly and assembly box
String,StringBuffer and StringBuilder
reader and stream
* JVM Basics
JVM Memory model
Common garbage collection algorithms
* Fundamentals of concurrent programming
Synchronized Key words principle
Safe thread termination and thread state transition
Thread pool principle
5. Database foundation
Three paradigms of database , affair ACID, Isolation level , view , Indexes
JPA Entity status
* Network foundation
* Common design patterns
Decorator , Template method , strategy , factory , state