How did I prepare for the technical interview when I got the Tencent Android interview offer!

Tencent's interview experience

Tencent’s interview means that I have gone through Tencent’s written test, then one side, two sides, three sides, and finally HR interview, then wait for news, and finally get an offer. The written test is basically some basic knowledge, such as data structure, computer composition principles, operating systems, and computer networks. Listen carefully in class, and brush some questions before the written test is not a big problem.

On the Tencent side, I mainly talked about some basics. I went to the mobile client, but there were few mobile-related questions in the whole interview. The main thing was to talk about some basics. If you want to get an offer from Tencent, I think the foundation is very important. As for the interview questions, I don’t think there is much to mention, because these questions are not fixed. The interviewer mainly talks with you around your resume. In your resume, it is written that your APP involves downloading. , Then the Internet must ask, what do you ask? I think TCP and HTTP are both worth asking. There is a book called "Programmer's Self-cultivation". I think this book needs time to read. I have seen many people complain that I am going to face iOS, and my interview is actually an Android. From my personal point of view, whether it is iOS or Android, there are many similarities in many design ideas. of. Just say what you think. I personally think that thinking is still very important.

Sharing of interview questions:

1. The difference between mvp and mvvm how the databinding in mvvm refreshes the view
2. Cross-process communication, binder mechanism
3. Leakcanary principle
4. Memory optimization and tools, APK slimming
5. The difference between get and post, enter an address in the browser and then Show what operations are done in the process of the page
6. The principle of
resumable upload and download 7. The principle of glide caching, the principle of lru algorithm
8. The principle of dynamic proxy

The biggest impression that Tencent gave me was a sentence from the interviewer, pick a project that you think is OK, and then we talk about something. From this sentence, I feel that many people can feel it. The second aspect is mainly to talk about you. There must be a project. And prepare this thing well. There are also no specific problems. Everyone’s project is different, and the implementation plan cannot be exactly the same. Therefore, it is impossible to talk about the same things. On the other hand, there is too much experience, but the main thing is to prepare a project seriously.

Two-sided interview questions to share:

1.java virtual machine
2. Memory optimization
3. Arraylist hashmap linkedhashmap
4. Binder 5.
SurfaceView and view
6. AMS WMS
7. APK slimming
8. Locking (deadlock scenarios and solutions)
9. Algorithm two string comparison The largest public string is mainly the idea (in the face of problems, use larger ones)

Three interview questions to share:

1. http optimization okhttp multiplexing
2. coin exchange problem [algorithm]
3. Car passing problem, on a road, the probability of seeing a car passing within 30 minutes is 90%, then what is the probability within 5 minutes
4 The display form of the graph
5. The code of the global currency conversion function
6. Give you an integer array nums, please find the length of the longest sub-array whose product is a positive number

Preparation before the interview

This is what I want to talk about most with you, because it is necessary to focus on sharing about the preparation before the interview or what to prepare.

Many people don't know what to say during the interview, and many people also say that they should lead the interviewer instead of being led by the interviewer. But what to do? Don't we let the interviewer speak? Do we set questions for the interviewer? This is all unrealistic, right? However, with some preparation, we can still "set a topic" for the interviewer. What should we do? Give some simple examples

For example: you write in your resume that you have some understanding of Socket, then it is natural to talk about TCP, you prepare well in advance, you can predict it yourself, when the interviewer asks about your Socket, It will naturally go to TCP. How to prepare? Many people have checked on the Internet. The classic TCP is the three-way handshake when connecting, and the four waves when disconnecting. You also simply checked what kind of handshake is three times and what kind of wave is four times, but is this just enough? Why don't we go deeper to prepare? For example, why is there three times of connection and four times of disconnection? What happens if I connect twice? A total of three packets are sent in the three-way handshake, so does it just perform three functions? Going deeper may involve the TCP header structure, as well as the TCP connection. What are the effective values ​​of SYN, FIN, and ACK when disconnected? I believe you will definitely get points if you tell them all. Of course, if you want to say it well, it does not mean that you can check it before the interview. It must be understood. This is what I call the preparation before the interview. Don't interview for the interview, but learn for the interview and improve yourself.

I can give another simple example. Regarding image caching, there are many dynamic image caching solutions in iOS and Android. If you write in your brief that you have done related operations, I think this thing is still worth asking. Knowing that you will be asked, you must prepare well before the interview. During the preparation process, I think I need to summarize what are the advantages and disadvantages of my solution, what do you plan to do in response to your disadvantages, or how you can solve some well-known open source libraries that you know, you have What can I learn from, so I feel that you must be awarded points. At least you have read open source libraries and thought about it seriously.

I've seen someone asked how to cache pictures, he simply said to download pictures through URL and save them for use. There are many things that are worth talking about on this topic. Just say this, I think it is impossible for the interviewer to get the answer he wants. He did not get the answer, and he must go and ask you again. At this time you will be significantly passive, and the next step is to be led away by the interviewer. Some people will ask what can I talk about?

Let me give some simple examples. For example, the picture caching scheme must involve the download of pictures. Since it is a download, how do you call back the download progress information? What if the download fails? How do you do the callback when the download is complete? The download must involve multi-threaded downloads, so how do you manage these threads? What is the structure of the thread manager? Even a URL download connection is being downloaded, and another place initiates a download of the same URL. In this case, I think that in order to save resources, a new thread should not be opened to download. Then, have you dealt with this situation? How to do it? In fact, there are many questions worth considering and worth talking about. Do caching, what you do is disk caching? Or memory cache? Or is it both? Whether to support the setting of the disk space size, how to set the image validity period, and the image cleaning work, I believe that no matter whether it is in iOS or Android, those well-known open source libraries cannot simply have a cleaning plan, which must support partial cleaning, or What is the basis for all cleanup and partial cleanup? For example, clean up according to the validity period of the picture. After the validity period we set, we need to clean up this part of the content at this time. In addition, if the total size of all cached files exceeds this size, the premature files will be removed in a half recursion in the reverse order of the last modification time of the files until the actual size of the cache is less than the maximum use we set space. There are many things to say about these things. Of course, as long as you have a deeper understanding and understanding, the deeper you will experience and the better your expression.

I think it’s easy to talk about the things just mentioned for 20 minutes, because there are too many things and points worth noting. Prepare a project, find out a bright spot in your project, and then seriously summarize it, and look at some other people's plans, see what you don't have, what you don't have is the defect of your plan, and see how to solve it. I think that defects are still very important. There is no perfect solution. A good solution is only to meet all current business needs. According to your business needs, talk about your design philosophy. You don’t need too many projects, just sum up one seriously. The key is that many people have done a lot of projects, but they didn't seriously understand and summarize one, and they did it for nothing, it was only the increase in code proficiency.

Afterword

Don't interview for the sake of interviews, but learn for improvement. If you improve, you will be able to calmly face the interviews of well-known companies.

Just write here first, the code word is not easy, and the writing is very one-sided. Please point out the bad points. If you think it has reference value, you can also pay attention to me.

My [Github] will share some knowledge about the advanced aspects of Android, and will also share the latest interview questions~

If you are proficient in the knowledge points listed in [Github] , I believe it will greatly increase your chances of passing the first two rounds of technical interviews! These contents are for your reference and learn from each other.

①"Android Interview Questions Analysis" PDF full HD version +②"Android Interview Knowledge System" learning mind map compression package——————You can read and download it on my [Github] , and finally feel helpful and needy friends Can like it

Guess you like

Origin blog.csdn.net/weixin_43901866/article/details/111310737