Welcome to follow wechat official account:Architecture Notes for Hugesia (ID: Shishan100)

My new course ** “C2C e-commerce System Micro-service Architecture 120-day Practical Training Camp” is online in the public account ruxihu Technology Nest **, interested students, you can click the link below for details:

120-Day Training Camp of C2C E-commerce System Micro-Service Architecture

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

This article is from the public account reader Bella Jiang’s interview experience to share

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Directory:

  • admission

  • Today’s headline

  • Meituan

  • drops

  • jingdong

  • others

  • Algorithm problem

  • HR side

  • tips

admission

There are a few more companies for this interview, mainly because I have been looking for the first two jobs in a hasty way after graduation, so I want to find a job to settle down for a few years since I graduated from EMM.

Here are the results of the interview:

To hr: Ali, Meituan, Didi, Jinshanyun, daily tao, Huobi, creditease, Wangdiantong, rickshaw, linkedMe

Other:

Xiaomi (four rounds of technical aspects, about 4 hours, big data department, I don’t know if the person in charge of the four sides dislike me for not having big data experience, but I really don’t have ha)

Jingdong (one round of telephone interview and two rounds of on-site interview. After the interview, it was nearly one o ‘clock at noon, and he told me to go home first and then ask HR to contact me by phone

A week later, the interviewer asked me whether I would still consider jd. If so, I would follow up. At that time, I already had a better offer, so I said I would not consider it and hoped to cooperate with you again in the future, so there was no follow-up.)

Headline (after the second interview, my algorithm was really bad, and then leetcode only brushed 10 questions, so I went to the headline, it was really a bit of a dead beat, really sorry for helping me push the big guy Shichong)

Iqiyi (one round of telephone interview and two rounds of on-site interview, until the end of the technical interview, this was my fault, the interviewer was also very busy, and we kept changing the interview time each other, I was an hour late for the interview time, or when the time arrived, I called hr to say that I would arrive an hour later

Although I knew it was a bad thing to do, the situation was complicated at that time, and I couldn’t handle it at all. I was in the interview all the time, and I couldn’t call HR during the interview. Meet two families a day, and learn a lesson from those who are still far away.

I originally wanted to make an appointment in the afternoon of the next day, but HR wanted the same day. As a result, the second meeting started at 7:40 PM, lasted until 9:00 PM, and then there was no meeting.)

Good (telephone interview round + on-site two rounds, to the end of the technical interview, the interviewer “base consider Hangzhou”, I “ah, you don’t need people in Beijing, the best Beijing ha, Hangzhou temporarily not considered”, and then no and then, ha ha.

Ali behind the time I hit the face, the interviewer “base Hangzhou to consider”, I “met Ali I will go to Hangzhou, but I am in Beijing”. Love, be bold to say it.

This interview is basically three to four rounds of technical aspects, many of them are at least one algorithm for each round, so if you are going to change your job, you can get up to the algorithm. Leetcode easy and medium difficulty is OK, of course, if you also want to brush hard difficulty, it is better.

As a scum who has only brushed 10 Leetcodes, I would like to brush leetcode in the future and save my IQ. If you’re ready for a headline, do it on medium and hard. Come on, guys. I don’t think so.

There are many friends in the group doubt that I am 985, 211 or graduate school, not ha, dreben (but I still love my Alma mater), graduated in 2016, I a girl can do it, you can do it, so believe in yourself, to work hard.

This article is mainly to record my interview experience and share some interview questions that are of great concern to my friends in the group. Then I will recommend some books at the end of the article, which are completely free of charge. I personally feel good about them and they can improve my skills.

Ali’s interview questions will not be shared, this time mainly to share TMDJ, as well as some interview questions from other companies, I have shared these interview questions have mastered, want to go to ali’s partner is also very very helpful.

Of course, the interview questions only play a role of checking the gaps, and not let you directly to sort out the answers, to memorize the answers. A qualified interviewer will ask questions about your resume, which means that everyone’s interview questions are different.

headlines

During the second round of technical meeting, from 17:00 to 20:25, HR took me to experience the legendary Headline restaurant in less than half an hour during dinner time

  1. Talk about the project, draw the project architecture diagram, draw a flow chart of what services the user passes through from initiating a request to receiving a response and what each service does

  2. How did you solve the difficulties and challenges in the project

  3. There are several types in Redis & how are they implemented at the bottom & where and how are they used in the project

  4. How redis implements distributed locks, zK implements distributed locks, the difference between the two. Distributed locks expire in Redis before service execution is complete. How to solve this problem

  5. Synchronized low-level implementation, added in the method and added in the synchronized code block after the compilation of the difference, class lock, object lock

  6. Lock the upgrade process

  7. Java runtime regions and what they do, what you know about GC, the Java memory model, and why

  8. An understanding of indexes, composite indexes, best practices for indexes

  9. Have you used countDownLatch before? How did you use it in the project? What do you know about AQS

  10. To write producer-consumer problems, consider the high concurrency, you can use the Java class library and write the code white paper

  11. As shown in the figure below

  12. Design a number generator, considering the cluster and high concurrency, the id generated by the number generator is required to be an increasing trend, through the ID can be distinguished from the ID generated today or yesterday, but the generated ID can not be directly with the date, to have a certain confusion function, white paper to write the code

  13. A two-digit array in which each element can go up, down, or left, to find the longest increasing path. As shown in the figure below, the longest increment path is the red font path. Write code in white paper.

! [](https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2019/9/4/16cf9be2788163c2~tplv-t2oaga2asx-image.image)Copy the code

Meituan

Phone interview (40 minutes) + 3 rounds of on-site technical interview (3.5 hours) + HRBP interview (30 minutes)

  1. Database and cache consistency issues. Update the database first, and then update the cache. If the database has been updated, but the cache has not been updated, then a request comes in and accesses the data in the cache, what can be done?

  2. Clustered index/non-clustered index, mysql index base implementation, why not use b-tree, why not use hash, leaf nodes store data or memory address pointing to data, some points need to pay attention to when using index

  3. Mysql default transaction isolation level (MVCC, RR, rc

  4. Mysql does not provide a mechanism for deadlock resolution. Mysql does not provide a mechanism for deadlock resolution. Mysql does not provide a mechanism for deadlock resolution

  5. Let’s talk about GC, what is garbage, what are the GC algorithms, what are the garbage collectors, CMS and G1 differences, EMM, and a question to the soul, have seen the source of CMS, cry with Tears of Joy

  6. Have you checked the problem of OOM online and how

  7. Have you used the tools that come with the JVM and how

  8. Suppose you have a picture of full GC as shown below, vertical is memory usage, horizontal is time, how do you troubleshoot this full GC problem, how do you solve these problems you mentioned?

  9. Explain your understanding of collection classes in Java, which ones are used in the project, where are they used, and how are they used

  10. Understanding of CAS, problems brought by CAS, how to solve these problems

  11. Volatile low-level, synchronized low-level, lock escalation process, MESI

  12. Which caches are supported by EhCache

  13. Is there any juC research? Talk about it

  14. Talk about the project, draw the project architecture diagram, draw a flow chart of what services the user passes through from initiating a request to receiving a response and what each service does

  15. Talk about the difficulties and challenges in the project, how to solve them, the project will be asked in particular detail

  16. How can RocketMQ messages be sequenced, and how can repeated consumption be addressed

  17. How are idempotent operations of interfaces guaranteed in projects

  18. Explain your understanding of Redis, how it is used in the project, where it is used and why

  19. What is the difference between sentinel mechanism and Redis? Which one is used in the project? Why

  20. Talk about understanding distributed locks

  21. How is system monitoring done in the project

  22. How to understand AOP and IOC, as well as DI in Spring

  23. Have not read MyBatis source code

  24. Name a framework that you know the most about and state your understanding

  25. How to understand distributed transactions, why this problem occurs, how to solve it, and what distributed transaction middleware to know

  26. Talk about the understanding of sub-database sub-table

  27. Hystrix function & how it is used in the project & How Hystrix detects whether circuit breakers need to be opened/closed & Hystrix implementation principle, other fusing current limiting middleware besides Hystrix

  28. Dubbo has any idea

  29. How to understand optimistic lock and pessimistic lock in Java and mysql

  30. Consistency of the hash

drops

Three rounds of on-site technical interviews + one HRBP interview (4 hours 5 minutes)

  1. Talk about the project, draw the project architecture diagram, draw a user from initiating a request to receive a response in the process of what services each service do flow chart, talk about database design

  2. Have you dealt with oom online? How

  3. Have you ever encountered the situation of high CPU of online server? How to deal with it

  4. Did you encounter other problems online? How did you deal with them

  5. Understanding of thread pools, where and how they are used in the project, which implementation class in the Excutor framework is used, and why

  6. Understanding of CAS, problems brought by CAS, how to solve these problems

  7. Volatile low-level, synchronized low-level, lock escalation process, MESI

  8. Understanding mysql indexes, understanding composite indexes, index best practices

  9. The realization and comparison of distributed lock redis distributed lock & ZK distributed lock

  10. How to achieve the unique ID, the implementation principle of Snowflake, what are the problems of Snowflake, how to avoid the order volume can be calculated according to the order number today

  11. If a function on the line is implemented using a stack structure, what should be noticed in using it and why

  12. How to understand thread safety

  13. How to understand interface idempotent, how to ensure interface idempotent in the project

  14. How to understand microservices, how to divide services, which aspects can be divided from, why, what benefits and disadvantages do microservices bring, how to view this problem

  15. How to understand the gateway, its advantages and disadvantages, and how to solve them

  16. How does Hystrix detect whether circuit breakers need to be opened/closed? How does Hystrix implement it

  17. How to understand command mode and observer mode, write a code for observer mode or command mode, or policy mode

  18. Know which design patterns, which are commonly used, how they are used in projects, why this, why not that, and write a thread-safe singleton pattern

  19. How to design a seckill system

  20. If I want to achieve 10W requests per second and cannot fuse current limit, how to design

  21. Suppose at midnight of Double Eleven, a large number of orders are placed. How do we store and list these orders? Why

  22. Service A invokes an interface of service B, and service B invokes an interface of service C. If service B responds successfully to service A, then service C must respond successfully to service B. System performance needs to be considered

  23. What should we pay attention to when using recursion? What can be used to replace recursion

  24. There are two tables, table A and table B, write SQL query only in table A, only in table B, both in table A and in table B

  25. Do you know spring source code

  26. MyBatis source code has no understanding

  27. Mysql transaction isolation level, MVCC

Me: Since many business lines are now Go, have you considered converting the rest of the business lines into Go? Interviewer: IN my opinion, language is only a tool. Language should not be a factor in development. What the interviewer said makes sense.

jingdong

Phone interview (30 minutes) + two rounds of on-site technical interview (1 hour and 40 minutes) at 12:50 after the interview, he asked me to come back first and hr would call me later

A week later, the interviewer asked me if I was still considering JINGdong. I don’t think so. I hope we can cooperate in the future

  1. A final modifier property that is not initialized when defined, initialized ina no-argument constructor, ok? Why

  2. Explain your understanding of collection classes in Java, which ones have been used in the project, where they are used, how they are used, why not use other collection classes

  3. HashMap, concurrentHashMap underlying implementation,

  4. How is list deletion implemented? Can it be deleted during traversal? Why

  5. What data structures are in Redis, how are they implemented at the bottom, and how are they compared to similar data structures in Java

  6. Is Redis single-threaded or multi-threaded, and why so fast

  7. What can I do if a key in the Redis hash is too large and becomes a String key? How can I avoid this problem

  8. Where and how are design patterns used in the project? Can you draw a UML diagram of design patterns you are familiar with, handwritten singletons, handwritten singletons implemented by static inner classes

  9. In practice, which scenarios use the B +tree index and which scenarios use the hash index

  10. Explain what information can be seen, what information explains what, explain the results of the column

  11. Have you read the Spring source code? How much will you say

  12. MyBatis source code read no, how much will say how much

  13. Cas, cas shortcomings, how to solve

  14. How to implement aQS and countDownLatch

  15. How is the thread pool implemented, what is the core thread count and maximum thread count, why is this set, where is the thread pool used in the project, and what do you need to pay attention to when using it

  16. What transaction isolation level is used in mysql projects and why

  17. Volatile underlying principle, synchronized implementation mechanism,

  18. Understanding XA, TCC, what distributed transaction frameworks are known, what are the disadvantages

  19. Feign and Dubbo, tell me what you know

  20. Eureka and Zookeeper. Tell us what you know

  21. Hystrix and Sentinel. Tell me what you know

  22. Spring Cloud Alibaba, say what you know

  23. On the sub-database sub-table, read and write separation of understanding, understand how much to say how much

  24. Draw a diagram of a Java thread’s states and transitions between them

  25. Talk about the project, draw the project architecture diagram, draw a flow chart of what services each service does in the process from initiating a request to receiving a response, and tell the specific database design to what fields are in part of the table.

  26. Emm: Our department has a large volume, so we may have to work overtime until 2 or 3 o ‘clock in the morning, or overnight, which is a period of promotion. Can you accept that

  27. Emm will also work overtime until 10 o ‘clock, this is not a rush period, but it is not everyday, abnormal situation, can you accept it, where do you live, how long will you be here, do you have a boyfriend? Let’s go to lunch. We have a staff canteen here. No, no, I’ll go home for lunch

Below are some of the questions I have encountered in interviews with companies other than TMDJ. I will not repeat the questions I have already been asked in TMDJ. I will only write down questions from individual companies that I remember

others

Huobi: Four rounds of technical interview + one round of HR interview (4 hours). Later, HR sister told me that they normally had two rounds of technical interview, because the interviewer could not find her after the technical interview. Then, EMM came to another round of technical interview, and another round of technical interview, with tears of joy

  1. Does adding a consumer to the Consumer Group speed up the consumption of messages? What if I want to speed up the consumption of messages

  2. Redis several data structures and underlying, how to use redis in the project

  3. Sentinel mechanisms, election algorithms

  4. Consistency of the hash

  5. Is Redis single-threaded or multi-threaded, and why is it so fast

  6. Several ways and differences of multiplexing

  7. Understanding of thread pools, how they are used in projects, how data is shared between multiple threads, how data is shared between multiple processes

  8. The difference between hashMap, concurrentHashMap and the underlying implementation, hashMap and hashTable

  9. What is a red-black tree, what is a B-tree, and why are red-black trees used in hashMap instead of other trees

  10. Mysql index b+tree, not b-tree or other tree, why not hash index

  11. Double-write consistency issues between databases and caches

Daily scoop: Three rounds of technical interviews + one HRBP interview

  1. Which Object class methods have you used and how

  2. How is Serialization implemented in Java and Serialization

  3. How is countDownLatch implemented

  4. How to do the monitoring and alarm mechanism in the project, tell us your understanding

  5. Online server CPU is high, how to deal with this problem

  6. Service A invokes service B, but the response is slow when A user requests service A. How can I locate the problem

  7. What is the state of TIME_WAIT? Remember when this state occurs on the network

1. Kernel mode and user mode, CAS and Sout which use kernel mode and user mode switch

2. Which typical applications use UDP

3. Do you know about thread pool and how it is used in the project

4. How to set the number of core threads and the maximum number of threads in the thread pool for compute-intensive /IO intensive tasks, and why

5. Suppose I have a meeting with five people at 5pm, but all of them are out of the office right now, but will be back today and ask, “How do I run this meeting, using Java concurrency knowledge?

Wangdiantong: 5 hours +, I haven’t had a meal at noon, afternoon interview time is really hungry to die, and afternoon brain cells died a lot of a lot of

  • First machine test (50 minutes, choose two out of three, no network, clearly inform the machine test failed no follow-up)

  • At the same time, I told the interviewer my computer test ideas, and the interviewer ran to see the results, and then asked some questions (what is b-tree, what is B+tree and so on).

  • Written test (10 multiple choice questions +2 database questions +2 algorithm questions, 30 minutes)

  • Two face to the interviewer about their own machine test ideas, the interviewer run to see the results, and then to the interviewer about pen test questions, a talk about why so write, in the process of the interviewer may change the topic, and then ask you how to solve the modified topic, and then asked a few questions

  • Three began the normal interview, but not to see the resume, part of the resume, part of the interviewer mood

  • Hr side

I offered on the spot, but when I came out of his house, I thought, if I had known what the afternoon would be like, I’d better have lunch and go home and have a good sleep

Want to go to his little friend to write code, look more at the implementation of some methods in Java, because the machine test of the topic is required not to use the method provided in Java, to write their own, and then to prepare the algorithm

Algorithm problem

  1. [1,1,2,2,3,4,4,5,5,5] find non-repeating elements (rickshaw)

  2. Reverse linked list, time complexity O(N), space complexity O(1) (Huobi)

  3. Non-recursive Fibonacci Sequence Implementation (IQiyi)

  4. This week’s stock price is [2,6,1,4,8], ask which day to buy which day to sell, can obtain the maximum profit, what is the maximum profit (iqiyi)

  5. Find binary tree by arrow direction (Jinshanyun)

  6. Table A, B and C are associated with ID, and the shaded part of the data is obtained (Jinshan Cloud)

  7. An integer unordered array, in which the sum of three numbers equals only one target value, find these three numbers.

  8. Linked list problem (Xiaomi)

  9. Poker problem (millet) there are ten cards, from the top to take out, take out a put on the table, and then take out a put on the bottom of the cards, so cyclic operation, until the hand of the cards are not. At this point, the order of cards on the table is exactly 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. I’m going to write code to figure out the original order

  10. linkedMe

  11. Handwritten LRU algorithm (Huobi)

  12. String addition (drops)

The sum of the two numbers will return the same value as the string. It takes 15 minutes to return the same valueCopy the code
  1. Find target value location (didi)
I have a two-dimensional array, horizontally ordered, vertically ordered, and I find the position of the target value in 10 minutesCopy the code
  1. Find the longest palindrome in the string “efabcbaefehiabCBA”.

  2. Invert the value x of int, using int instead of String. For this program, write its due test cases (Meituan)

  3. Top K questions (Daily Wash)

HR side

Treat people sincerely, with sincerity for sincerity, do not play tricks, what HR questions, answer truthfully. Be polite when rejecting an offer.

tips

In fact, during the interview process, you can feel which interviewers really appreciate you, and which are just looking for someone who can do the work, and finally make sure to go to an interviewer who appreciates you, because the pay is really different

(I pretend that I have experienced leaders who just want to work for me. I am very grateful that every leader I met before appreciates me and gives me the space I want to do what I want to do. Thank you very much indeed.)

Well, it’s time for free Amway. You can’t learn to lose, you can’t be fooled

  • In-depth Understanding of the Java Virtual Machine

  • The Art of Concurrent Programming in Java

  • Java Concurrent Programming

  • InnoDB Storage Engine

  • Redis Design and Implementation

  • JVM G1 Source Code Analysis and Tuning

  • Redefining Spring Cloud In Action

  • Redis Deep Adventures: Core Principles and Practical Applications

  • Spring Technology Insider myBatis Technology Insider

  • In Depth Disassembling the Java VIRTUAL Machine

Etc., etc.

Personally, I feel there are a lot of very good columns in geek Time and Nuggets, emM, but I haven’t read all of these books/columns myself

END