How did I pass the Ali interview?

Starting from Ali's interview, Ali's interview is generally in the form of a telephone interview. The author participated in a total of five rounds of interviews, one phone interview + online programming, two video interviews + online programming, three department boss interviews, four cross interviews, and five HR interviews. Let me share the general questions of the five rounds of interviews. The author is an android developer, and the type of questions will be more android.

On the one hand
, Ali's interviewers are very kind. On the one hand, the interviewer listened to the voice and felt that it should be the feeling of joining the company for two or three years. After I introduced myself, I started to ask android-related questions directly. Probably the problem is as follows:

  • dp, px, dip related concepts in android

  • handler mechanism, four components and source code analysis

  • Layout-related control functions and implementation principles

  • Layout optimization in android

  • Which relativelayout and LinearLayout should be used when the effect is the same? Why?

  • The working principle of view and the process of measure, layout, and draw, and it is required to understand the source code

  • How to customize a barrage control?

  • If the control is stuck inside, how do you solve it and optimize it?

  • Cache mechanism of listview

  • Invalidate, postInvalidate, requestLayout application scenarios

  • Multi-threading, 5 threads print hello and word internally, hello is first, and a method is required to make all 5 threads print hello first and then print 5 words.

  • Implement a custom view, which contains several textviews, the textview text can be wrapped and customized - - - - The height of the view can be adaptively expanded

  • Programming Question: Sort an array with elements 0, 1, and 2. After typing a method of directly traversing the three numbers and printing them, let them implement it by handwriting. After the handwriting implementation, let me talk about a stable method. I said a method that can be implemented by traversing three subscripts again. Readers can Baidu, I won't go into details here.

After one face, I was quite confused. I felt the firepower of Ali's school recruitment. Ali's requirements were higher than the level of "knowing and using". You need to understand the underlying principles and mechanisms to pass the test. 50min on one side. After the interview was over, the interviewer said that he needed to give feedback on the interview process to know whether he passed or not. Later, he learned that Ali's side was a "resume screening" interview, and there would not be too many people. I feel good about myself, I answered about 80 to 90% in general, and I am ready for the second interview after the interview.

Two sides
Two sides are very important, two sides are very important, two sides are very important. Both sides are important to whether you can pass the interview and whether you can finally be fished out of the pool. I received a phone call from Hangzhou in the afternoon of the second day after one face-to-face meeting. I made an appointment at 9:00 p.m. and informed me of the video interview and online programming. After a while of panic... After reading so many face-to-face scriptures, I have never seen anyone who programmed twice in a row... At nine o'clock in the evening, after logging in to the video website on time, the interviewer was already online. The interviewer on the second interview was a little serious, and it felt very rigorous. After a brief self-introduction, he said that one side evaluation is better, and he will be more detailed in the interview, which may take a little longer. At that time, my mind was tense, and I was ready for a fierce battle. The content of the two-sided question is very large, and the coverage is very wide. The general questions are as follows:

JVM side

  • Java memory model, five parts, program counter, stack, local stack, heap, method area.

  • The concept, characteristics and function of each part.

  • The process of class loading, loading, verification, preparation, parsing, initialization. Each section is described in detail.

  • The .class file is read in the loading stage. Is the class file binary? Why do you need to use the binary method?

  • What problem is the verification process preventing? What is the verification process like? Execution order of loading and validation? What does the symbolic reference mean?

  • Prepare the static member variables of the process to allocate space and set initial values.

  • Resolve process symbolic references instead of direct references for details.

  • The initialization process is related to the explicit initialization of the jvm.

  • The process and trigger conditions of class unloading.

  • Three class loaders, how to customize a class loader?

  • Parental delegation mechanism.

  • The JVM memory allocation strategy is prioritized in the eden area, dynamic object age judgment, allocation guarantee strategy, etc.

  • JVM garbage collection strategy, how to judge objects and classes need to be recycled?

  • Four garbage collection algorithms mark-sweep, copy, mark-sort, and generational collection.

  • Garbage collector in JVM, young generation collector, old generation collector, stop-the-world concept and solution.

  • Four types of references and usage scenarios?

  • Basically, all the big concepts in the JVM are asked, and really need to be understood in place. JVM is more familiar, and Barabara kept talking throughout the whole process, without any danger.

  • Collection class
    Initial question: Does hashmap understand? With a joy in my heart, I turned on the chatting (hu blowing) mode. The following points were mentioned:

    • Data structures implemented by hashmap, arrays, buckets, etc.

    • Hash conflict resolution method for hashmap: zipper method, etc. The advantages and disadvantages of the zipper method.

    • Parameters of hashmap and key parameters affecting performance: load factor and initial capacity.

    • The process of the Resize operation.

    • The reason why the hashmap capacity is a power of 2.

    • After the talk, the interviewer was quite satisfied and said that it was good to have a deep understanding. He threw the next question, hashtable. Do you understand? Another joy in my heart, and an introduction:

    • Hashtable thread safety, synchronized locking.

    • Similarities and differences between hashtable and hashmap.

    • Why is hashtable deprecated?

    • He decisively brought the topic to concurrenthashmap, and talked about the optimization of concurrenthashmap compared to hashtable, the concept of segment, and the reasons why concurrenthashmap is efficient. Questions asked by the interviewer in the middle:

    • The concept of fastfail in container classes.

    • Is the insertion operation of concurrenthashmap a direct operation of the linked list in the array?

    • Collection-related overs, because they are all talking on their own initiative, they have seized the initiative, and they are very happy to talk.

  • Multithreading

    • Since the concept of concurrenthashmap is proposed above, it is logical to talk about multithreading. With the experience in the previous part, I took the initiative to talk about the whole process, and the interviewer asked some targeted questions, which are roughly as follows:

    • Why use multithreading? Multithreading requires attention. Context overhead, deadlocks, etc.

    • Java memory model, causes of thread unsafety.

    • volatile keyword, cache coherence, instruction reordering concepts.

    • synchronize keyword, java object header, Markword concept, synchronize underlying monitorenter and monitorexit instructions.

    • Contrast lock statement with synchronize.

    • Atomic operations, CAS concepts, related parameters.

    • Optimistic locking, pessimistic locking concepts and usage scenarios.

    • Thread pool concept, implementation principle, etc.

    • The optimization of JVM locks, the concept and principle of biased locks and lightweight locks.

    • In terms of multi-threading, the answer is relatively good, and the interviewer's feedback is relatively satisfactory.

  • Database
    The author's level of database database is relatively good, and there is no in-depth understanding. The interviewer asked a question,

    • What are the benefits of aliasing tables or fields in SQL statements?
      I don't know how to answer, and the interviewer didn't ask about the database again. After that, the interviewer asked about the operating system, and the answer was: I didn't learn it. Interviewer: Okay, let's not ask. I was moved beyond words to describe.

  • Communication Protocol
    The next step is to understand the communication protocol, and probably ask the following questions:

    • TCP handshakes three times and waves four times.

    • HTTP request message structure, response message, and status code.

    • Compared with http1.0, http2.0 has new features, such as push, multiplexing, message header compression, etc.

    • The communication protocol is not too deep, and it is enough to understand it better. The interviewer's feedback is good. Finally, I asked android. The interviewer said that I felt that your android should be very powerful. I was really flattered at that time.

  • android
    android is the highlight. Because I have learned a lot before, I don't ask much about the basics of android, and it is more in-depth. There are probably the following problems:

    • The handler mechanism consists of the source code of each part of the handler mechanism, including the loop method in the looper, the threadlocal concept, the source code of the dispatchmessage method, and the runnable package message.

    • Listview caching mechanism, recycleview caching mechanism.

    • Bitmap efficient loading, L3 cache, etc.

    • Principle of binder mechanism.

    • The working principle of view and the process of measure, layout, and draw. Which process can be executed in a child thread?

    • What should I pay attention to in the draw method?

    • View event dispatch mechanism.

    • Android performance optimization: layout optimization, drawing optimization, memory leak optimization, bitmap, memory leak, etc.

    • The concept of memory leak? Scenarios happening in android? How to deal with it? Talked about handler, animation, etc.

During the android interview, I really calmed down and told the interviewer all my understandings in an orderly manner. Feedback is also good.

  • Algorithm
    The last question is online programming. The question is relatively conventional, and it is the largest continuous subsequence of a question. You need to pay attention to the processing of all negative numbers. You can Baidu by yourself without going into details here.

There was a small episode when writing the algorithm, because the interviewer was all written in java, and the author was more familiar with writing algorithms in C++, and the interviewer was not familiar with c++ compilation (g++), so they looked at each other for a while before successfully compiling the output. . Thank you very much for the meticulousness and patience of the second interviewer, the best interview experience. The interviewer said that he passed this side of him, and there will be one or two rounds of technical interviews. After politely thanking the interviewer, it is over, and the second side is over. 108min on both sides. After closing the connection, I took a long breath and shared the good news with my girlfriend. After this battle, I knew that my journey to Ali was halfway through.

Why are two sides important? Because the second side is the most detailed and in-depth round of interviews in the technical interview, the interviewers later will largely refer to the results of this interview, and it is said that this side affects the rating.

I received three
calls in the afternoon of the second day after the three interviews, and made an appointment for an interview at 3:00. Since the previous interviews could be completed in the classroom at night (thank you my girlfriend, there would be no good environment to complete the interview without your company) ), at three o’clock during the class time, there were hardly any empty classrooms, so I completed three interviews in the small room where the teachers were resting.

The interviewer on the three sides felt that he was at the level of the department head. After he introduced himself, he started to ask questions. I asked about an android project I did in school on my resume, said a difficult point, and talked about push. Barabala talked about aurora push. I felt that the interviewer was not very cold. I asked about the realization principle of Jiguang push. The author was nervous and even forgot Talking about long connections... I also asked about Huawei's internship project, its difficulties, and how to optimize it... I picked up the alphabet tree, and I felt that the interviewer was still not too impressed. At this time, I was already a little flustered, and then... the interviewer began to ask about the advantages and disadvantages, the company I signed with before, why you want to go to Hangzhou, and what do you think of the algorithm? I also asked about the best sense of achievement, why do you think you won the first prize? Is it because the opponent is too weak (bewildered...)? After answering, I directly asked what questions I wanted to ask him... At this time, I was a little bit broken, and I felt that the answer was not very good. I asked what areas need to be improved. Then ended the interview... 29mins for three sides.

It was very uncomfortable after the three sides, and I felt that the feedback was not very good, and I did not perform well. After a while of sadness, I ate a meal and went back to the library to continue reading.

Sifang
When I was still in the library in the evening, when I was feeling that Ali had left me, a call from Hangzhou came... I made an appointment with the interviewer of Sifang to do an interview in terms of technology and overall quality. In a hurry, I went to find an empty classroom with my girlfriend, and the call came at 9 o'clock as scheduled. The interviewers on all sides felt gentle and elegant, and came up to introduce that this was a round of cross-faces and the last round of technical interviews. After introducing myself as usual, I asked the following questions:

letter of agreement

  • TCP guarantees the implementation of reliable transmission: stop-and-wait protocol, sliding window protocol, flow control, congestion control, etc.

project

  • Talk about a function that you remember deeply: I talked about the implementation of a function to view the terminal information of the current WiFi network connection.

  • Talk about the problem you encountered: I talked about the problem of optimizing the matching of a string of hundreds of thousands of levels through letter tree optimization. After listening to it, the interviewer and I analyzed it in detail, and got a better implementation method... At that time, there was a burst of shame, and the class was axed.

  • Asked about the three-level caching strategy used in the project.

  • Award

  • We talked about the award-winning experience and how you learned in the middle. The interviewer looked at the previous interview process and said that he asked about multiple threads, so he would not ask...

Database
The database side asked the following questions:

Kind of index.

  • B-tree, B+ tree, red-black tree.

  • What are the advantages and application scenarios of B+ trees compared to B trees?

  • What are some characteristics of red-black trees? How to keep balance?

  • I asked about the database, I asked about the data structure... After that, the interviewer felt that you were all prepared. I said yes, after all, it was Ali, the interviewer smiled and said that I had I'm going to ask you about the top eight rankings. Now I feel like you should be able to. I am confident (jian zha) to say yes, I will. So far, the interviewer said that he has no technical questions to ask. This is a round of cross-examination, which is required by the group. He is background development and does not understand android. He asked me what else I wanted to ask. The author threw a panacea question, what other aspects do you think I need to optimize? The interviewer laughed and said that all of you students are asking routine questions now, and he basically answered this question, and then said that he felt both depth and breadth. 48min on all sides. So far, I am completely at ease. After a happy weekend, we ended the interview. After sharing the good news with his girlfriend, the progress bar of Ali Road has reached 80%. As for why there is an intersection, there are different opinions and it is not clear.

Five Faces (HR)
went to the library to study as usual after the weekend, and received a call from HR on Monday afternoon. I prepared some common HR interview questions over the weekend, but none of them were asked. The questions asked are as follows:

Why didn't the programming questions of the previous written test come up? Did you think about it later?
What is the salary of the company you signed with? If Ali gives you an offer, how do you consider these two offers?
Why didn't you stay with the company you were intern at before? How did the previous executives of the company evaluate you?
Your strengths and weaknesses?
Finally, ask questions every day, and ask questions about the cultivation system and promotion mechanism. After the interview, I told him that there would be results in one to two weeks, and we had to take a group of people out of the pool to make an offer (he was flustered, after all, the opponents who came to the end should not be underestimated). Then the HR interviewer added WeChat, and if you have any questions, you can communicate on WeChat.

After
the HR interview, I lay down in the spare tire pool with peace of mind. The days of waiting are always difficult. Day by day, I inquired about various news. I heard that some of the first few batches had received offers, and I felt relieved. After the past four days, I asked the HR interviewer on Friday afternoon and learned that the offer has been approved. It is said that it is relatively stable, and it is just a process. Thinking that I had been waiting for a long time for the offer approval from Tencent hr before, I still feel uneasy. After the weekend, Monday and Tuesday, the offer has been approved for three days, and the anxiety level is increasing day by day. At 10:30 on Tuesday night, when I was bored in the dormitory reading the news, I suddenly received a text message and an email. After opening it, I found that it was a letter of intent. Really happy, take a long breath, finally this road has come to an end.

The above is the sharing of my Ali Spring Recruitment Road.

Summary
I have written a lot here, and I also have some experiences to share with you. From looking for an internship in the spring of 2017 to the spring of 2018, the days of looking for a job are really tiring, but no matter how tired you are, you must persevere. I am fortunate to have participated in interviews with some companies, and the questions asked are similar, mainly in the following aspects:

  • java basics

  • Collection class

  • Multithreading

  • JVM virtual machine

  • letter of agreement

  • database

  • operating system

  • algorithm

  • your technical direction

  • project

  • The review of each aspect will be shared later

Let’s talk about some personal feelings
. It’s actually very easy to find a job. Some companies can let you go to work with a degree alone. Now there is a shortage of programmers. It’s so simple that you don’t talk about technology, life, and awards in the interview. I will send you an offer, but it is not easy to find a good job. It is common for dozens or hundreds of people to grab one or two positions.

Mainly, how do you define your understanding of "good", high salary? Is the company technically good? High status in the industry? Work security and benefits? Not working overtime? The benevolent sees the benevolence and the wise sees the wisdom. There is no need to force your own values ​​to judge the work of others. The most suitable is the best. Therefore, when looking for a job, it is also very important to think clearly about what kind of job you want. Defining a goal and working hard to do it is the most important thing.

Skills Talk
About some interview skills, I personally think that the most fundamental thing is to expand the breadth and breadth of your knowledge structure and form your set of speech structure. Take multi-threading as an example, ask you multi-threading? Can start with why use multithreading? What are the benefits of using multithreading? Will using multithreading be better than single threading? What problems can multithreading cause? What is the java memory model causing the problem? how to solve this problem? What is the underlying implementation of solutions such as volatile, synchronize keywords, etc.? How did you use multithreading? What are the benefits of using thread pools...
If you really understand and perfect it into a system, the interviewer asks you to talk about multithreading, and you can finish it for the next 10 minutes. The reference of the interview is not how you compare with the interviewer, but how you compare with your competitors. If the above set is completed perfectly, the interviewer's evaluation of you can be imagined.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325507271&siteId=291194637