After working for 3 years, it took a month to get a headline offer (Java Post)

Before starting the formal summary, I still hope that my colleagues can listen to me and continue to vent for a while, hold fists!

I turned on the flag I set in early 2020, and I felt ashamed. One of them was to keep writing a blog for a week, but for various reasons, I couldn't keep it going. If you think about it carefully, the main reason is that you didn't really calm down and devote yourself to the research and learning of technology. So why is this happening? To put it bluntly or because there is no target or unclear target, no target or unclear target may lead to the failure of the action.

So the question is, what is the goal? As far as I am concerned, the short-term goal is to study a certain technology in depth. For example, I am studying mysql recently, so in-depth study must be practiced and produced. Is this enough? We also need to be able to draw inferences from one another and consider what we should pay attention to in daily development based on actual development scenarios. Are there any pitfalls in this? It can be seen that progress is really not a simple matter. This kind of anti-human behavior requires us to overcome our weaknesses and gradually form a habit. A truly awesome person never thinks that it is so difficult to study seriously, because this has formed his habit, it is as natural and simple as getting up in the morning to brush your teeth and wash your face.

After pulling so much, I started to get into the topic,

Preparation process

Let me talk about my own situation first. I did an internship at Ant for nearly three months in 2017, and then went to my current old club with 2.5 years of work experience. It can be said that after graduation, I have been honestly upgrading from my old club. I have an internship experience with Ant, but because the time is too short, it is still a bit imaginary. So the interviewer saw that the first question on my resume was absolutely like this.

"Wow, you have been at Ant, not bad," the interviewer asked with a grin. "Yes, it's fine", I said. "Why is it only three months?" the interviewer asked with a deep face. "Well, explain...", I explained. "Oh, that's the case, let's start the interview," the interviewer said solemnly.

Nima, I knew that I didn't write about Ant's internship experience. I thought about it carefully later, didn't I add some material to my resume when I wrote Ant.

To return to the subject, the preparation process actually started very early (of course, this does not mean that I always think about changing jobs when I work, because I understand that my current boss is not the end, and I need to continue to improve), and it can be traced back to the time when Ant left. At that time, I met with a lot of companies, but there weren't any big companies. I met with about 5 companies and all got offers.

In my spare time, I often go to study the technologies I am interested in and the technologies used in my work, trying to understand the principles and practice them myself. In addition, I have bought more than N books, and I will read them when I have time to supplement the basics. I have basically reviewed the source code of operating systems, data structures and algorithms, MySQL, JDK, etc. (I will list them at the end of the article. Books and some good information). I know that the foundation is like the short board of the "barrel effect", which determines how much water can be filled.

In addition, before officially deciding to look at the opportunity, I made an outline for myself, mainly including the core points to be mastered by Java. If you don't understand, please check the information to understand. I position myself as a Java engineer, so the Java system must be well known. Many things are easy to show up when they don't have years of accumulation in interviews. Learn to be worthy of yourself and don't lie.

Let’s talk about my experience in the headline interview.

After working for 3 years, it took a month to get a headline offer (Java Post)

 

Before the interview

Toutiao’s interview is very professional. Before each interview, a special HR will make an appointment with you, and the interview will be conducted after OK. Every time I passed the video interview, because it was always on the phone or on-site, the video interview was still a bit unnatural. Some people think the video interview experience is very good, of course, turnip greens have their own love.

one side

  1. Introduce yourself first
  2. Talk about the project, what does the reverse system mean
  3. Talk about the project, what technologies are used in the reverse system
  4. How to determine the number of threads in the thread pool?
  5. How to determine if it is mainly IO operation?
  6. How to determine if a computational operation?
  7. Are you familiar with Redis and what data structures do you know about it? (Said zset) How is the bottom layer of zset implemented? (jump table)
  8. What is the query process of the jump table, and the time complexity of query and insertion? (Speaking of searching from the first level, if not satisfied, sink to the second level to find, because each level is ordered, write The time complexity of entry and insertion are both O(logN))
  9. Do you understand the red-black tree, the time complexity? (Said it is an N-ary balanced tree, O(logN))
  10. Since the time complexity of the two data structures is O(logN), why does zset not use red-black trees (jumping the table is simple to implement, and the cost of stepping on the pit is low, and the red-black tree must be rotated every time it is inserted to maintain balance, which is complicated to achieve)
  11. I nodded and talked about the principle of Dubbo? (Talking about the process of service registration and release and consumer invocation) Have you stepped on any pit? (Talking about dubbo exception handling and printing accesslog issues)
  12. Does CAS understand? (Talking about the implementation of CAS) Do you know other synchronization mechanisms? (Talking about synchronize and the difference between the two, an optimistic lock, a pessimistic lock)
  13. Let's do a problem, array A, 2*n elements, n odd numbers, n even numbers, design an algorithm so that the odd numbers in the array are all odd numbers, and the even numbers are even numbers.
  14. Let me talk about your idea first (start traversing from 0 subscript, if it is an odd subscript to determine whether the element is odd, skip it, otherwise look for the next odd number from this position)
  15. The next odd number? How to find? (A bit stunned, thinking...)
  16. Any ideas? (It is still to traverse the array once and judge the subscript. If the attribute of the subscript does not match the element at the position, traverse the array element from the next subscript and replace it)
  17. Your time complexity is a bit high. If you require O(N), what should you do (think about it for a while, and answer "Define two pointers, start traversing from subscripts 0 and 1, respectively. When encountering odd bits, it is even and even Stop at odd numbers and exchange content")
  18. Time is almost up, let's get here first. What do you want to ask me?

Two sides

  1. The interviewer is very kind, so introduce yourself first
  2. How do you understand service governance?
  3. How to achieve the current limit in the project? (Guava ratelimiter, token bucket algorithm)
  4. How does it work? (The main point is a fixed rate and a limited number of tokens)
  5. If suddenly many threads request tokens at the same time, what's the problem? (Resulting in a lot of request backlogs and thread blocking)
  6. How to solve it? (You can put the backlog of requests in the message queue and process them asynchronously)
  7. What if I don't use the message queue? (Talking about the pre-consumption strategy of RateLimiter)
  8. How is the context of distributed tracing stored and transferred? (ThreadLocal + spanId, the spanId of the current node is used as the parent spanId of the next node)
  9. How is Dubbo's RpcContext passed? (ThreadLocal) How is the ThreadLocal of the main thread passed to the thread pool? (Said that the context information is first obtained in the main thread through the get method of ThreadLocal, and a new ThreadLocal is created in the thread pool and the context information obtained before is set to the ThreadLocal. Note that the ThreadLocal created by the thread pool must be manually created in the finally remove, otherwise there will be memory leaks)
  10. How exactly did the memory leak you mentioned occur? (Speaking of the structure of ThreadLocal, there are mainly two scenarios: the main thread still has a reference to ThreadLocal and the main thread does not have a reference to ThreadLocal. In the first scenario, because the main thread is still running, there is still a reference to ThreadLocal, then The reference and value of the ThreadLocal variable will not be recycled. In the second scenario, although the main thread does not have a reference to ThreadLocal, and the reference is a weak reference, it will be recycled at the time of gc, but the value used is not weak Reference, will not be reclaimed by memory, and still cause memory leak)
  11. Does the thread of the thread pool have to be manually removed to recover the value? (Yes, because the core thread of the thread pool always exists, if it is not cleaned up, then the threadLocals variable of the core thread will always hold the ThreadLocal variable)
  12. Do you mean the memory leak in the main thread or the thread pool? (Main thread)
  13. But isn't the main thread exited, shouldn't the referenced objects be recycled? (Interviewer and memory leak are on the bar), there is a silence for a while. . .
  14. So how do you tell SpringMVC different user login information to ensure thread safety? (The explanation just now was a bit awkward. I didn't react at all. I actually answered that I was locked. My brain was a little dizzy. At this time, an hour has passed and I feel that the situation is not good...)
  15. Isn't it enough to use ThreadLocal directly? Have you seen any code implemented by SpringMVC with locks? (A bit dizzy...)
  16. Let’s talk about mysql, and talk about the index structure (B+ tree)
  17. Why use B+ tree? (Said query efficiency is high, O(logN), can make full use of the characteristics of disk read-ahead, multi-branch tree, small depth, orderly leaf nodes and store data)
  18. What is index coverage? (forgotten...)
  19. Why does Java design a parent delegation model?
  20. When do you need a custom class loader?
  21. Let's do a problem, handwriting an object pool
  22. Is there anything you want to ask me? (It feels like I haven't answered a lot of points. Did you hang up? (It really turned out to be))

to sum up

Toutiao’s interview is indeed very professional. Every time the interviewer will send you a video link in advance, and then start the interview on time, and the points examined are relatively complete.

Interviewers have a characteristic. They will grasp a point that is worthy of in-depth or that you haven't made clear until you make it clear, otherwise the interviewer will feel that you don't really understand. The second interviewer gave me some suggestions. When researching technology, we must study the background and figure out what specific problems are solved in which scenarios. In fact, many technologies are interlinked. Very sincere, still very grateful to the interviewer greatly.

It took about a month from the beginning of the interview to the end of Toutiao Noodles a year ago, and I felt a bit exhausted physically and mentally. Finally got the offer from headlines

What I want to say here is to do two things before the interview: resume and self-introduction. The resume should be a good review of some of the projects you have done, and then pick a few highlight projects. Self-introduction is basically available in every round of interview, so it is best to practice in advance and figure out what to say and how to say it separately. In addition, the technology mentioned in the resume must have been studied in depth by yourself. If you have not studied in depth, it is better to find some information to warm up and not fight unprepared battles.

Due to space reasons, I will not show all of them here. I have compiled these questions into pdf files and shared them for free to those in need. At the same time, it took a lot of time to organize them. Friends in need can help forward and share and then private message Keywords [Interview] to get a free way to receive it!

Full list and answer display,

Reader benefits

Friends who have read this can also send a private message to me to receive a free collection of Java core knowledge system documents and more Jav advanced knowledge notes and materials.

How to get free information : Click here to get it for free!

After working for 3 years, it took a month to get a headline offer (Java Post)

 

More notes to share

After working for 3 years, it took a month to get a headline offer (Java Post)

Guess you like

Origin blog.csdn.net/m0_46995061/article/details/112970231