Home > Common Problem > body text

See how this girl got an offer from Meituan?

Release: 2023-07-26 16:55:08
forward
977 people have browsed it

Meituan, I submitted my resume on Lagou.com. I submitted it once before, but my resume failed to pass the deletion. Later, I asked my senior to help me change my resume and re-submit it. I applied to another department and got an interview opportunity. On October 23, HR called me at noon and made an appointment for an interview at 4:30 pm. He said he would write code online and asked me to prepare the network environment. As a result, I still didn't call at 5:30, so I was let go. After re-communicating with HR, we decided to meet again next Monday afternoon. However, communicating with HR to make an appointment seems to be of no use in Meituan.

One interview (20 minutes)

It’s 7 o’clock in the evening, because I want to have an interview next Monday, and I’m just going to go out to play badminton, from Beijing The call came. The interviewer apologized in various ways, saying that the meeting was delayed.

1. Self-introduction

I have said it many times, and it is very smooth to pick up the key points.

2. Ask me if the data structure algorithm is good.

It’s pretty good (actually I’m still a little weak, but I’ve answered a lot of questions recently and I can only be brave enough to pretend to be fat).

3. Find the three equal points of the singly linked list. What if the singly linked list has a ring?

Use the fast and slow pointers, one step for one step and the other three steps. If there is a loop, first determine where the loop is, find the last node, and then use the previous loop-free method.

4. Let’s talk about the project structure

I focused on MVC.

5. Talk about the design patterns you are familiar with

I focused on singletons, factory methods, and agents.

6. Have you ever configured a server?

I really don’t know about this, I’ve never heard of it. I can only honestly say no, after all, there’s no point in talking about it.

I was in a hurry. I guess the interviewer had just finished the meeting and hadn't eaten yet. He told me to wait and maybe find a colleague to interview me, and maybe he would tell me the result directly. Judging from the interviewer's voice and tone, I judged that he must be the boss of the department and asked more questions about design. Later, the HR told me that he was the boss of the department I wanted to go to. Ha ha.

二面(60 minutes)

After the first interview, I was about to go out to play badminton when the call from Beijing came again. (Destined not to participate in team activities this Friday!)

二面: Compared with Yiyi, the second-face interviewer sounds like someone who is engaged in technical development. As expected, an hour of pure technology Phone interview! 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 Spring. I haven’t reviewed the details and framework, so I don’t really remember them. So I told the interviewer that I understood some of the more important mechanisms in Spring quite well, and then I used a practical example to explain my understanding of IOC and AOP. He listened and said that he was right and understood well (a rare encounter). I’m so happy to have an interviewer who can give feedback during the interview).


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


2. Multi-threading: How to achieve thread safety, what are the differences between various implementation methods, the use of volatile keywords, the understanding of reentrant locks, whether Synchronized is reentrant Lock in


Here I will mainly talk about the Synchronized keyword, as well as some locks under the concurrent package, as well as their respective advantages, disadvantages and differences. I mainly talked about the volatile keyword from three aspects: visibility, atomicity and prohibiting JVM instruction reordering. I also talked about the volatile keyword I used in the multi-threaded singleton mode double-check to prohibit JVM instruction reordering optimization. .


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


I talked about the underlying layer of HashMap Array plus singly linked list implementation, Node internal class, add process, Hash conflict resolution, expansion, three collection views. The implementation method of HashMap thread safety mainly talks about the static method SynchronizedMap in HashTable, ConcurrentHashMap and Collections, which can encapsulate HashMap. And the difference and efficiency performance of these three methods.


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


JVM memory It is mainly divided into five areas, which ones are shared by threads, which ones are exclusive to threads, and what is stored in each area. GC: How to determine which objects need to be GC, GC methods, Minor GC and Full GC. HotSpot GC algorithm and 7 types of garbage collection periods, 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 processes and threads


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


6. Does HTTP have state? I said stateless. How to solve HTTP statelessness


How to solve HTTP statelessness Stateless is actually how to track sessions. There are four methods: URL rewriting, hidden form fields, cookies, and sessions.


7. Java IO, NIO, is asynchronous IO implemented in Java?


Java IO implements synchronization Blocking, 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 probably saw that I knew a lot about this area, so he continued to ask me if asynchronous IO is implemented in Java. I felt like there wasn't, but the interviewer said there was, and let me think about it. In fact, I didn't know much about this, so I asked I told the interviewer my understanding of the asynchronous IO model in Unix, and then said that I really don't know whether it exists in Java. (He actually laughed! He said that your understanding is correct. It doesn’t matter whether there is Java in it! Haha)


8. Does the front end know it? What is Ajax? Ajax implementation Principle


# I only know how to use some js on the front end. I have used the jquery framework. Ask me what the full name of Ajax is. 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 for asynchronous query through XMLHttpRequest object. The Ajax engine runs on the client, which reduces the workload of the server.


9. Let me design a thread pool


Because it is written in my resume that I am familiar with multi-threading, The concurrency aspect is better understood. So he always asks questions in this area. Because I have seen the source code of ThreadPoolExecutor before, I thought about this problem based on the design idea of ​​​​that class. I talked in detail about the core pool, the factory method pattern that can be used to create threads, thread pool status, blocking queue, Rejection strategies in these aspects. The design is quite thorough.


10. Let’s talk about a few design patterns, where they are used, and why we should use the


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


11. Mysql optimization and index implementation


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


12. Transaction isolation level


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


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


I will briefly explain this, respectively. What to do.


14. Linux


I said I learned this in my undergraduate degree, but I haven’t used it for a long time and I forgot all the commands. He said it's okay, he will test you on a few simple tests: cd, ls, dir (really simple).


15. Algorithm question


Find the smallest 10 numbers from 100,000, time complexity analysis (Maximum heap, considering memory).


Find the maximum sum of consecutive subarrays from a positive and negative array, time complexity analysis (dynamic programming)

Full binary tree i level How many nodes are there? How many nodes are there in the n-level full binary tree.

Finally it’s time for me to ask questions:


1. What department are you in (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 don’t have this environment in school that allows me to experience this aspect. What do you suggest? How can I learn it now (he said that it is really not easy to learn. I can only read some theories and other people's blogs, and then I can slowly learn it at work in the future).


3. What exactly does middleware do? Is it to solve high concurrency and load balancing? (He said almost yes, and then he said that our department is not middleware. It's the big data department, I know (yes, I know).


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

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


Three interviews (25 minutes)

The interviewer said that he was from another department and needed to conduct a cross interview.


1. MySql optimization.


#2. Tell us what the project has done, its architecture, etc.


3. Write code online on collabedit. The question is very simple. It is the original question on The Beauty of Programming. An ordered integer array, output two numbers, so that their and is a given value. I have done it before and wrote it quickly, and then explained the ideas to him. He went on 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 (use HashMap)

This aspect is quite simple. It just adds an online code writing link that I haven't had in previous interviews. I later learned about collabedit. Some Internet companies like Facebook use this online editor to write code for remote interviews. It is a text document. There is no prompt and it cannot be compiled. Running is the same as writing on a whiteboard. Just practice your hands regularly.


Four interviews with HR (30 minutes)

The interviewer from the three interviews said that was the final interview and said that I would wait for HR to contact me after I passed. I. I never expected that the HR interview half an hour later would also be technical.

1. Introduce yourself. Why do you introduce yourself when you are surrounded by others? ! I thought it was a simple HR interview, so the introduction was all about my personality and life, but it turned out not to be the case.

2. Ask about the project, and ask very detailed questions about the technical details, what problems you encountered, how you solved them, whether there is someone to lead the project, and how you communicate with others.

3. Database optimization, what should I do if a table in the database is extremely large?

Database optimization I talked about the points that I have talked about many times before. He asked what to do if a table is extremely large: big table Divide into small tables, how to implement: use partition table.

4. Ask graduate students about their scientific research topics, why they chose this topic, and what papers they read (even asking me in detail which journals those papers were published in, and which school the authors were from), and why they chose this topic. How is this algorithm optimized? How do the experimental results compare with others? Why is it better than other algorithms? (Questions keep coming at me. I guess he doesn’t quite understand the professional terms I’m talking about. I’m just trying to determine if it’s me. It’s just what I’m doing...)

5. Determine the internship time

This aspect really makes me feel a sense of pressure. The project was done as an undergraduate and it took a long time. Some technical details are not too detailed. Summary, so if I ask in detail, I can only make up my thoughts, hehe. In terms of scientific research, it's not bad. I was working on this last semester. I still remember the implementation, improvement and comparison of some algorithms quite clearly. I answered it very fluently. Maybe this is really a technical HR aspect.

I’m so tired. I don’t want to look for an internship anymore. I have to say that Meituan’s intern interviews are as grand as formal school recruitment offers. I’m so tired from all sides. This department is also very good and I’m very satisfied. , so I don’t want to continue looking for it. So far, the review of Java basics, databases, computer networks, and operating systems has been completed. Now, just brush up on the questions every day and keep at it. Next, prepare to take a look at the Tomcat source code. We are about to enter a new stage. This is not the end, so come on.


The above is the detailed content of See how this girl got an offer from Meituan?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:Java学习指南
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template