.

2020 school recruitment has begun, in order to understand the latest hot questions, Shaoxia decided to “risk”, to bring you fresh out of the original factory real questions! The space limit, will not enumerate the answer one by one, if have the reader that is interested or to the question answer, welcome the comment or the private letter exchange!

Commercial Realization Department (20200705)

Pass:

MySQL > select * from ‘MySQL’; What is the inverted index, MySQL inverted index implementation principle? Handwriting: three threads add the same variable ten times, the main thread waits for three child threads to complete the sum, and prints 30. How does ThreadLocal work? What do redo logs and undo logs do? HTTPS encryption and decryption process? Nginx request process? Where does the sessionID exist? Can an infinite loop cause a crash? What are the JVM reference types? Strong references, weak references, what are the application scenarios? How to design a short link service, such as weibo short link. Handwriting: Post-sequential traversal of binary trees (non-recursive). Handwriting: integer square root, accurate to m decimal places.

Second face (Pass) :

1 million data import cache Redis, how to achieve? Quiz: 9 fans, 1 gift, 1 dice, how to fairly decide who to distribute this gift to? Health code design logic? How to achieve positioning? How is cache consistency implemented? Handwriting: Longest continuous common substring? How are distributed transactions implemented? Quiz: How do 64 horses find the four fastest horses? What are the difficulties or challenges encountered in the project?

Three sides (Pass) :

What are the difficulties or challenges encountered in the project? How to implement primary/secondary synchronization in MySQL? What data types are available in Redis? When updating data during development, update Redis or MySQL first? How to ensure Redis and MySQL double write consistency? What design patterns have been used in development? Tell me about the UML diagram of the policy pattern and why it was adopted. What design patterns are applied in the JDK? Handwriting: Inverts the linked list from position M to n. Use a scan to complete the inversion. Handwriting: given an n× N integer matrix, find the sum of the smallest path elements?

HR surface (Pass) :

Which companies’ offers have you received in school recruitment? Why did you choose your present company at that time? Why do you want to move to Bytedance now? Have you met any problems at work that don’t meet your expectations?

Boss add (Reject) :

What are the difficulties or challenges encountered in the project? MySQL EXPLAIN what parameters the execution plan has. Handwriting: right link query. Design: randomized luncheon background: more and more customer growth r&d department of the students, the division of labor is becoming more and more fine, more than 200 people all at ordinary times less chance of interaction, so hope every month, randomly selected some students (the current plan is 8) in the surrounding find a place for dinner, then go team activity funds for reimbursement. Requirements: I hope to write a simple program to complete the random selection of students to dine together every month. Specific requirements: 1. Students who have been selected will have a significantly lower right to be selected later. 2 the program is convenient to deploy and use; 3. Consider possible anomalies. Handwriting: Tian Ji horse racing

PS. At that time, I thought that the Boss added the surface to send me SP, because I felt that the performance of the first three aspects was ok, and the basic and algorithm questions were basically done. The next day HR (yes, the one who contacted me before that the offer had been approved) sent me a thank-you letter. And here comes the story…

Education Business Department (20200805)

After the business realment department was rejected by the Boss, the HR of the education department contacted me and said that referring to my previous interview could reduce one aspect, so we had two rounds of interviews of the education department.

Pass:

HTTPS encryption? Say something about TIME_WAIT? What’s the difference between a cookie and a session? How is the session stored on the server? Redis expiration policy? RPC call process and principle? MySQL transaction isolation level? What are the difficulties and problems to be considered in designing seckill system? How to solve the distributed consistency problem of seckill system? Second kill system how to design the architecture, in order to withstand the instantaneous flow like Tmall Double eleven? How does token bucket flow limiting work? Handwriting: reverse a one-way linked list every N values.

Second face (Pass) :

Analysis of project difficulties and solutions? The system architecture of the project? Nginx load Balancing policy? Why is the IP hash policy selected? Have you learned about the system architecture of Tmall? How to achieve high concurrency and high availability? What is the maximum number of records a MySQL table should have? This threshold is likely to be an empirical value. Tell me what factors this empirical value is based on. MySQL > select LIMIT from pagination tables; Does message queuing guarantee consistency? How to ensure the consistency of distributed transactions? Rehashing a HashMap is a time-consuming process. How can I redesign this function so that the rehashing code on the line does not affect performance? Handwriting: The length of the longest covered line segment?