preface

In a blink of an eye, 2020 has passed more than half, 2020 is difficult, the enterprise layoffs of the news quite a lot, demotion, do not send year-end bonuses and so on. 2020 was indeed a difficult year. But life goes on, and time doesn’t give you a chance to lose! If we stick with it and keep improving ourselves, new opportunities may open up.

Networking (HTTP, HTTPS, TCP, UDP), JVM, classloading mechanisms, etc. These are the basics that come up frequently in an interview, and every programmer can talk a lot about them. But not necessarily get to the point and understand the rationale behind it.

I was often asked this question during the interview process, so I wrote it down. Do not underestimate these foundations, sometimes, your algorithm, project experience have passed, but the basic answer is not very good. The result may pass, but it certainly affects your rating, which is particularly damaging. So take some time to memorize and understand the rationale behind it.

To give a simple example, what is the PROCESS of HTTPS connection, which encryption method is used, can packet capture, how to prevent packet capture, can you answer the following.

Without further ado, began to enter the body.

technical

I forgot which side I asked, so I wrote it together, and the specific order was written casually.

Java related

  1. Comparison of String, StringBuffer, StringBuilder. Give me a scenario where StringBuffer is used.
  2. Finalize? I don’t know, but I know the relationship between final and finally, ok, try catch finally, and then the interviewer wrote some code on a piece of paper and asked me to determine what the output was. Since return is involved, ask me about the return mechanism in Java. A finally statement is not the final exit of a function. If a finally statement is present, finally will be executed after the return.
  3. Say this, as much as you know
  4. Hashcode and equals methods. In actual project development, what scenarios do we need to override manually?
  5. I see you use singletons, so write a “perfect” implementation of the singletons… And then pick the details
  6. Use Redis? Do you know of any other distributed caches? Tell me the difference with Mem*** D
  7. You know the anomaly? Which ones have you come across?
  8. Talk about the difference between soft and weak references
  9. How does HashMap put work? Different from Hashtable
  10. And maybe… I can’t remember

Android

  1. Activity A starts the (possibly transparent) process of Activity B, explaining the order of life cycle function callbacks
  2. Who calls the Activity’s lifecycle functions?
  3. What about the Fragment lifecycle? And who calls its life cycle functions?
  4. You know view drawing? Let’s talk about how views are drawn. What about redrawing invalidate? Let’s talk about the process from calling invalidate to onDraw.
  5. I see how many frames you use: How does LeakCanary work? How do you know if a memory leak occurred? How does ButterKnife inject? How does its bind method find the corresponding XML file and bind the control?
  6. You use the Litepal framework, what else do you know? Why use Litepal instead of those?
  7. SQLite is also a relational database. Let’s talk about some optimization methods for using relational databases
  8. Tell me about the Android event distribution mechanism. How does it work
  9. Ever used RecyclerView? The ListView? Okay, so let’s talk about some optimization techniques for ListView.
  10. What are the ways that Android threads communicate with each other? Okay, so let’s talk about how Handler works
  11. Studied Kotlin? Well, tell me what you know about Kotlin. Finally, when I talked with the interviewer, I knew that Kuaishou was already using Kotlin to develop an app. Haha, I felt a bit lucky. However, the following algorithm can not be written with Kotlin, or in Java…
  12. And maybe… I can’t remember

Computer network correlation

  1. Differences between UDP and TCP
  2. Speaking of congestion control, how does TCP implement congestion control? How do I determine the current network congestion?
  3. The difference between HTTPS and HTTP? The client accesses the server using an HTTPs URL
  4. You said TCP has a fixed header of 20 bytes. What does it contain?
  5. Three handshakes, four waves (more on that)? Why does it take three handshakes and four waves?
  6. And maybe… I can’t remember

algorithm

1, a multithreading problem, with five threads, sequential print numbers 1~ infinity, where every 5 numbers for 1 group, as follows: where ID represents the id of the thread

id 1 2 3 4 5 no 1 2 3 4 5 no 6 7 8 9 10 no 11 12 13 14 15 no .. . . . .Copy the code

Specific ideas and code implementation, of course, including a similar problem, has been sorted out to the blog: welcome to exchange

Interview question: common multithreading practice tore code (sequential printing of numbers, letters)

2. Check whether the linked list has a ring. And determine the entrance of the ring.

Offer:

The entry node of a linked list ring

HR side

Where is home? What do parents do? I see you are a communication major, why do you want to do client development? What school has bao Grind still tried? Why did you choose BUPT at last? Is there any other Offer? What is the salary? Wait… During this period, little sister has been talking about the products of Kuaishou, the daily activities are particularly large, the company has a good technical atmosphere, free lunch and dinner, gym and so on. Ha-ha. It was nice talking anyway.

Write in the last

I feel very lucky to get the internship Offer of Kuaishou. I didn’t start preparing until early March, and my classmates have already got the ideal Offer. Alas, it hasn’t been successful yet, so I still need to work hard.

The last

In a word, those of you who have no mines at home, if you want to live a better life in the future, think more about how to arrange your spare time;

Technical improvement is definitely a top priority, but some “soft power” outside of technology should not be completely ignored. In many cases, promotion is really due to your strong technical skills, but also closely related to your “soft power”

In this I also share a big man’s own collection of Android learning PDF+ architecture video + interview documents + source notes, as well as advanced architecture technology advanced brain map, Android development interview topic information, advanced advanced architecture information these are my leisure will repeatedly read and to subordinates to learn the quality of information. In the brain map, each knowledge topic is equipped with a corresponding actual combat project, which can effectively help you master the knowledge.

In short, it is also here to help everyone learn to improve and advance, but also to save the time we search for information on the Internet to learn, but also to share with friends around to learn together

You can click on it if you want

Believe in yourself, there is nothing impossible, only unexpected