Sanmian Meituan JAVA post has lost interview experience, I hope it can be helpful to everyone!


I am Yi, a code farmer who is being hit but working hard to advance. These are some of my experience interviewing with Meituan. I hope you can speed up your pace, add your own knowledge, enter the big factory as soon as possible, and complete your goals! The interviewer finally said to me that in fact, many things are connected at the bottom. Sometimes you will use these things, but you don’t know how they realize it. This is a big problem, because you don’t know how he does it. Realization, so when it has a problem, you don't know how to deal with it, so what you lack now is to change how to use it to why? This sentence has given me an enlightenment. Indeed, many things now know how to use them, but why they are used and what are the benefits of such use, but I really don’t know.

First side – 30 minutes

1. Self-introduction:
  I’m Barabala, a bunch, I still feel that I’m not good at speaking, I should praise myself more, talk more about the breadth of my knowledge, let the interviewer know that I have learned a lot and focus on what I am good at , Let him ask what he is good at for a while, and change it in future interviews.

2. Project: When
  I was a sophomore, I followed an online video to make a campus meal ordering system. Let me talk about this. Because I didn’t prepare for the interview at all, I told him it was a simple project. He briefly asked me about the implementation of the login module. . I think my answer is not very organized, and I should fully explain the function of re-login to the second login. Here you can do it according to what you have done before and how to say it.

3. Do you know load balancing:
  I have only used nginx load balancing briefly here, and I will briefly talk about how I use nginx for load balancing, nginx has multiple server addresses, set weights, and nginx receives front-end requests and then distributes them. Go to different servers to do business and reduce the pressure on a single server. Because I didn't learn the principle, I didn't go into it in depth.

4. The difference between String, StringBuilder, and StringBuffer in Java:
  General questions, I answered whether it is variable, usage scenarios, and thread safety. It should be almost the same.

5. MySQL Optimistic Locking Pessimistic Locking:
  I think this is the worst part of my answer, because I didn't have a split point answer at the time; I first talked about optimistic locking and pessimistic locking, and then talked about multi-version concurrency control (Should talk about success and failure), row locks (shared locks, exclusive locks), intent locks (shared and exclusive locks, here I forgot to emphasize table locks); because first talk about all the specific emphasis on optimistic locking The realization is mainly multi-version concurrency control, the process of a transaction after pessimistic lock is locked.

6. How to optimize a slow query SQL:
  index + SQL quality. (It is necessary to do a slow query optimization by yourself)

7. How to add indexes to optimize, and what are the precautions for adding indexes:
  I don't think it is difficult. It is covered in high-performance MySQL. . .

8. There are three fields in the table, id, name, version, how to safely modify the name under high concurrency:
  I did not answer here, (at the beginning, I just like the multi-version concurrency control can not be solved, why bother Add another version by yourself) My answer is 1. Locking (I feel that locking is the simplest and rude, pessimistic locking directly locks the row record) 2. Because I think there is a version, there must be a solution without locking Regarding the solution, I would say that you get the version first every time you modify it. When you modify it, you can only modify it if you judge that the obtained version is consistent with the version in the database. If it is inconsistent, the modification will fail, and the version will increase when you modify it.

9. What are the rejection strategies of the thread pool: If
  you forget it, I just said that there is one that is directly discarded without processing. (It's been useless for too long)

10. At the end of the interview, do I have anything I want to ask:
  I asked which department I would go to if I had passed: He said that I went to the order distribution department, which should be regarded as one of the core departments of Meituan, after all, Meituan’s The business is mainly to accept orders on the platform and send orders to the courier brother. If the Meituan has passed, and the core department has a high chance of becoming a regular employee, then Meituan will have an internship. I hope I can receive a follow-up interview before the internship.

Second side – more than 50 minutes

1. Talk about sychronized keywords, usage, low-level implementation, partial locks, lightweight locks, spin locks.
2. Talk about the principle and process of partial lock, lightweight lock.
3. In addition to sychronized, what else, talk about ReentrantLock, an implementation class that inherits AQS at the bottom.
4. Talk about AQS, volatile modified state, locking process, realization of fair lock and unfair lock.
5. The difference between TCP and UDP.
6. The process of three handshake and four wave of hands, why is this so.
7. Talk about ThreadLocal, why use threadLocal, in ThreadLocalMap, which key and value are strong references and which is weak reference, I am confused and insist that value is a strong reference. . .
8. The state of the thread and the state change process.
9. The difference between CMS and G1.
10. Talk about the dynamic proxy in Spring. If the interface is implemented, use JDK dynamic proxy, and if the interface is not implemented, use CGlib dynamic proxy. The difference between dynamic proxy and static proxy.
11. Commonly used design patterns, the principles and application of strategy patterns, then talk about the project, what have been done, what problems have been encountered Code problem: add the large numbers represented by the two linked lists, I use two stacks to save the linked lists, and then When popping out of the stack, use the head insertion method to generate a new linked list. I feel that the time complexity is not optimal. However, after the interviewer introduced the department and business, he was very enthusiastic and detailed. Then he said to wait for the HR notification~ Generally speaking, it is better than Starting from byte beating, Meituan’s interview is a little bit simpler, because it doesn’t ask too low-level, too divergent, and then the interviewers of the two companies are very praised, very patient and enthusiastic!

The third side-about 40 minutes or so

After the second interview, I was very fortunate to have a good chat with the interviewer. So, with the third invitational interview, this interview feels not as good as the previous interview. The overall interview experience is not very good, because It's the third side, and the result ended up in this round. It was successfully rejected by Meituan. This interview may indeed be a hurdle. Let me tell you what the problems are.

How to troubleshoot JVM problems that appear online.

Give you an interface, how do you handle repeated requests.

What is the TCP/IP protocol, three-way handshake and four waved hands?

How to deal with distributed Session.

At present, I seem to remember these four questions. These four questions, my feelings, and these four questions, the interviewer seems to be unsatisfied at all, so don’t think about the results. I don’t remember the other questions that came up. I don’t remember clearly. Yes, what are the similar questions in the second round of interviews, and I, successfully fell in the third round of interviews.

To be honest, I didn’t have any hope of being able to join the US Mission. After all, I’m a big company, and the things I asked were really awesome. The interviewer gave me answers to the last few questions. Although I didn’t pass the interview, the interview I'm quite happy with the advice the officer gave me.

to sum up

In fact, through this interview, I also summarized some requirements of Dachang for social recruitment personnel:

  1. Performance optimization, data structure and algorithm (very important).
  2. High concurrency, how to deal with such things.
  3. Database sub-database sub-table, bottom layer realization, index optimization.
  4. Basic (HashMap, JVM, Mybatis, Http, TCP/IP).

Recently, I have summarized most of the interview questions and answers involved in the interview of Java programmers for the knowledge points asked in the interview of Internet companies. I hope to help you review before the interview and find a good job, and save money. You learn in the time you search for information on the Internet. Full version of Java interview questions address: JAVA back-end interview questions integration

The content covers: Java, MyBatis, ZooKeeper, Dubbo, Elasticsearch, Memcached, Redis, MySQL, Spring, SpringBoot, SpringCloud, RabbitMQ, Kafka, Linux and other technology stacks.