[Interview Summary] I finally got the offer from Meituan, and I didn’t disappoint these three months of hard work.

Insert picture description here

In Meituan, I submitted my resume on Lagou. I also voted once before. The resume failed to be deleted. Later, I asked the senior sister to help me change my resume and re-invested in another department to get an interview opportunity. At noon, HR called to make an appointment for an interview at 4:30 in the afternoon. He said that he would write codes online and prepare me for the network environment. As a result, the pigeons were released without calling at 5:30. After re-communication with hr, I decided to meet again next Monday afternoon, but communicating with hr to make an appointment seems to be useless in Meituan.

Meituan technical side 20 minutes

At 7 o'clock in the evening, because I wanted to have an interview next Monday, I was just about to go out to play badminton when the call from Beijing came. The interviewer apologized, saying that the meeting was delayed.

1. Introduction

I have said it many times, and I have finished the introduction very smoothly.

2. Ask me if the data structure algorithm is good

Very good (in fact, the heart is still a little guilty, but recently I have brushed a lot of questions, but I can only courage to fill the fat man)

3. Find the third point of the singly linked list, if the singly linked list has a ring

Use the speed pointer to take one step and the other three steps. If there is a ring, first determine where the ring is, find the last node, and then use the previous acyclic approach

4. Talk about the structure of the project

I focused on MVC

5. Talk about design patterns you are familiar with

I focused on singletons, factory methods, agents

6. Have you configured the server?

I don't know this, I have never heard of it, I can only honestly say no, after all, I can't talk about it.

In a hurry, I guess the interviewer hasn’t eaten after the meeting. He said let me wait, maybe another colleague would meet me, and he would tell me the result directly. From the interviewer's voice and tone, I judged that he must be the boss of the department. He asked too many designs. Later, hr told me that he was the boss of the department I was going to. Haha.

Meituan technology two sides 60 minutes, detailed Q&A

After facing up and preparing to go out to play badminton, the call from Beijing came again. (Destined to not be able to participate in team activities this Friday!) Second side: Compared with the first side, the voice of the second side interviewer sounds like technical development. As expected, a one-hour purely technical telephone interview! The surface is very comprehensive!

1. Spring: Have you ever used Spring, Spring IOC, AOP mechanism and implementation, Spring MVC

In fact, I don't want to be asked about the details of Spring. I don't remember the framework after review. So I told the interviewer that I understood some of the more important mechanisms in Spring. Then I used a practical example to explain my understanding of IOC and AOP. He heard it right and understood it well (rarely encountered I'm so happy to be an interviewer who can give feedback while interviewing)

In fact, I have used Spring MVC. I told the interviewer about the MVC implemented by Servlet, jsp and javabean used in my project, as well as the responsibilities of each module of MVC and how each module is connected. Finally, I added I think the idea of ​​SpringMVC is actually the same as this one (he is right, hey, it’s nice to have feedback)

2. Multithreading: How to achieve thread safety, what are the differences between the implementation methods, the use of the volatile keyword, the understanding of reentrant locks, and is Synchronized reentrant locks?

Here I will mainly talk about the Synchronized keyword, some locks under concurrent packages, and their respective advantages, disadvantages and differences. I mainly talk about the volatile keyword from three aspects: visibility, atomicity, and prohibition of JVM instruction reordering. I also talked about the use of the volatile keyword in the multithreaded singleton mode double-check to prohibit JVM instruction reordering optimization. .

3. Collection: The underlying implementation of HashMap, how to realize HashMap thread safety

I talked about the bottom layer of HashMap is the realization of array plus singly linked list, Node internal classes, the process of add, Hash conflict resolution, expansion, and three collection views. The thread-safe implementation of HashMap mainly talks about HashTable, ConcurrentHashMap and the static method SynchronizedMap in Collections, which can encapsulate HashMap. And the difference between these three methods, efficiency performance.

4. JVM memory management, GC algorithm, garbage collector in HotSpot, class loading

JVM memory is mainly divided into five areas, which are shared by threads, which are shared by threads, and what is stored in each area. GC: How to determine which objects need to be GC, GC method, Minor GC and Full GC. HotSpot GC algorithm and 7 kinds of garbage collectors, mainly talking about CMS and G1 collector. Class loading: the process of class loading, Bootstrap classloader-ExtClassloader-AppClassloader, parent class delegation mechanism.

5. The difference between process and thread

Answered from four aspects: scheduling, concurrency, resources and system overhead.

6. Is there a state in HTTP? I say stateless. How to solve HTTP statelessness is actually how to perform session tracking. There are four methods: URL rewriting, hidden form fields, cookies, and sessions.

7. Java IO, NIO, is there any implementation of asynchronous IO in Java?

Java IO implements synchronous blocking, and how does it achieve synchronous blocking. I took the read() method as an example. NIO implements synchronous non-blocking. I talked in detail about the select() method polling in Selector to explain how it implements multiplexed IO. Then compare their efficiency. The interviewer may see that I have a better understanding of this area, and then continue to ask me if I have implemented asynchronous IO in Java. I don’t think it is, but the interviewer said yes. Let me think about it. Actually, I don’t know about it, so I just I told the interviewer about my understanding of the asynchronous IO model in Unix, and then said that I am really not sure about whether there is any in Java. (He actually laughed! Saying that you understand is correct, it doesn't matter whether there is in Java! Haha)

8. Will the front end, what is Ajax, and the principle of Ajax implementation?

I just use some js in the front end. I have used the jquery framework and asked me what is the full name of Ajax. I guess it is asynchronous js and xml. In fact, I don't understand the principle of Ajax implementation. I just briefly talked about it through the XMLHttpRequest object for asynchronous query. The Ajax engine runs on the client side, which reduces the workload of the server.

9. Let me design a thread pool

Because it is written in my resume that I have a better understanding of multithreading and concurrency. So he always asks questions in this area. This problem is because I have seen the source code of ThreadPoolExecutor before, so I modeled the design idea of ​​that class, and talked about the core pool in detail. The factory method model can be used to create threads, thread pool status, blocking queue, Reject these aspects of the strategy. The design is fairly comprehensive.

10. Talk about several design patterns, where are they used, and why are they used

Singleton mode, getRuntime() in jdk; Factory method mode, ThreadPoolExcutor uses ThreadFactory; Observer mode: Observable and Observer under java.util package. Finally, I mainly talked about the usage scenarios of the factory method pattern.

11. Mysql optimization and index realization

I talk about two aspects of database design optimization and query optimization. Index B+ tree implementation, the difference between InnoDB and MyISAM primary key index implementation, one is clustered and the other is non-clustered.

12. The isolation level of the transaction

Four isolation levels, what exceptions may occur, the default level in mysql.

13. Have you ever used Hibernate, mybatis, git?

This is just a brief talk, what are they doing

14、Linux

I said this undergraduate, but it didn't work for a long time and I forgot all the commands. He said it’s okay, test you a few simple ones: cd, ls, dir (really simple)

15. Algorithmic questions

1. Find the smallest 10 from 100,000 numbers, time complexity analysis (maximum heap, consider memory)
2. Find the maximum sum of consecutive sub-arrays from a positive and negative array, time complexity analysis (dynamic programming )
3. How many nodes are in the i-th level of the full binary tree, and how many nodes are there in the n-level full binary tree?

It's finally time for me to ask questions

1. What is your department (he said it is the core department, big data research and development)
2. I am very interested in high concurrency and load balancing, but I usually don’t have this environment in school for me to experience this, then How do you suggest that I can learn it now (he said it is really not easy to learn, only to read some theories and other people’s blogs, and I can learn it slowly in the future)
3. What does the middleware specifically do, is to solve high concurrency Is it with load balancing? (He said that it was almost true, and then he said that our department is not a middleware department, but a big data department. I said yes, I know)

In the end there was no problem, he asked me to keep the phone open.

After this side, my mouth was dry, and I suspected that he might not know that I was applying for an intern position. There is too much to summarize, let's talk about it together in the summary place.

Meituan technology three sides 25 minutes

The interviewer said that he was in another department and needed a cross-interview.

1. MySql optimization
2. Talk about what the project has done, architecture, etc.
3. Write the code online on collabedit, the title is very simple the original question on the beauty of programming, an ordered array of integers, output two numbers, Make their sum a given value. I did it before and wrote it quickly, and then gave him some ideas. He continued to ask what to do if the array is unordered, sort it first.
4. Two files, each file has several URLs, find the same URL in the two files (using HashMap)

This side is very simple, just add the link of online code writing that was not used in the previous interview. Collabedit later I learned that some Internet companies like Facebook will use this online editor to write code in remote interviews. It is written in text documents, without prompts, and cannot be compiled. Run, just like writing on a whiteboard. It's good to practice hands at ordinary times.

Meituan Technology HR all around 30 minutes

The three-sided interviewer said that he was the last one, saying that I will wait for hr to contact me. Unexpectedly, the hr noodles after half an hour were actually technical.

1. Introduce yourself, even if you are all around, do you introduce yourself? ! I thought it was pure hr noodles, so the introductions were all about my character and life, but the result was not.
2. Ask the project, the questions are particularly detailed, the technical details, what problems are encountered, how to solve them, is there anyone to take the project, and how to communicate with others.
3. Database optimization. If a table in the database is particularly large, how to do database optimization. I have talked about the points I have talked about many times before. He asked what to do if a table is particularly large: large tables are divided into small tables, how to achieve: use partitioned tables
4. Ask the graduate student’s research topic, why I chose this topic, what papers I have read (as far as to ask me which journal are those papers published in, which school is the author), why I choose this algorithm, how to optimize, and experiment How does the result compare with others? Why is it better than others' algorithms? (I guess he doesn’t understand the professional terms I’m talking about, I guess he doesn’t quite understand the professional terms I’m talking about. I just judge if I did it.)
5. The determination of the internship time really made me feel pressured. The project was done by an undergraduate. It has been a long time, and some technical details have not been summarized too much, so I can only even want to edit it when I ask for details, hehe. The scientific research aspect is okay. I have been working on this last semester. I remember the implementation and improvement of some algorithms and the comparison clearly, and the answer is quite smooth. Maybe this is really a technical hr aspect.

Finally: During
the six months of preparation, I myself have been constantly looking for materials to learn, and through many channels and friends, I want to get a copy of the latest learning materials for Java post. You can get it by [ click here, password CSDN ]~

Insert picture description here

The focus is to recommend to everyone. The Java post interview question bank in this information contains Java back-ends and interview scenes and interview questions from some major companies. I also continue to brush the questions to improve my vision

Java post technical interview question bank (5000+ interview questions)

There are many modules in this question bank: Java basics, container, multithreading, reflection, object copy, Java Web module, exception, network, design pattern, Spring/Spring MVC, Spring Boot/Spring Cloud, Hibernate, Mybatis , RabbitMQ, Kafka, Zookeeper, MySql, Redis, JVM...

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47345084/article/details/112271603