Tencent Java agency recruitment interview experience record (including answers)

one side

  1. Ask about project experience;

  2. Hashmap understanding.

  3. Understanding of redis distributed lock?

  4. If redis is used as a distributed lock, the master node is down, but the data has not been synchronized to the slave node, what should I do?

  5. 12306 website design framework.

  6. The difference between mysql two storage engines

  7. If there are a lot of additions and deletions, which storage engine should be selected and why?

  8. Talk about the understanding of object-oriented, talk about the understanding of polymorphism.

  9. The process of tcp wave four times? Why wait for 2MSL.

  10. What are the algorithms for congestion control? Is it exponential growth or linear growth in the early stage of the slow start?

  11. An unordered array, find topk.

  12. What dimensions are the sub-databases and sub-tables divided by? What is the partitioning algorithm, and will there be uneven data distribution.

  13. What is the granularity of locks supported by myisam and innodb?

  14. What are the ways to solve cache breakdown?

  15. When to choose a local lock when locking, and when to choose a distributed lock?

  16. Do you know those sorting algorithms? Quick sort average time complexity and worst time complexity. What is the worst situation in the partition process? Describe.

  17. A room has 100 stacks of lights, the serial numbers are 1-100, which can be opened or closed, and then there are 100 people, the serial numbers are 1-100, and then everyone will enter the room, and everyone will give their own serial number After performing an operation (turn on or off), ask how many lights will turn on in the end?

Two sides

  1. Ask about project experience.

  2. How to design distributed locks?

  3. Network io model. search engine.

  4. What is the use of phantom references in java?

  5. Design a login state system. How to ensure password plus transmission. What if you want the server to request an asymmetrically encrypted public key and the request is intercepted and tampered with?

  6. How to do database master-slave replication? But if it suddenly hangs up, how to ensure that the data for that period of time is hanged up?

  7. An e-commerce system has id and product name fields. Asking you how to design the architecture will involve fuzzy querying of products.

  8. How to solve the problem of distributed transaction in the double writing process. If the idea of ​​eventual consistency is adopted, what should I do if there are several concurrent requests and the data is inconsistent?

  9. The order number cannot be repeated, how do you design and generate the order number?

  10. A sorted array may have duplicate elements. It is required to return the number of unique elements and remove the duplicates of the first few digits of the array. For example, 1, 2, 2, 3, 3, 4 - "Requires that the first four digits are 1, 2, 3, 4, and it doesn’t matter what happens after 4, it returns 4.

  11. You can walk up to one step at a time, or two at a time. Ask how many middle steps you have.

  12. 52 playing cards, remove the big and small kings, and asked me the probability of touching the same suit three times.

  13. For a demand for grabbing red envelopes, each user is required to not exceed 5 times per minute at most. How do you solve this problem?

Three sides

  1. What is the thinking of the skip watch? Where is the jump table useful?

  2. How is service disaster recovery done?

  3. As the caller and the called, how to avoid the service avalanche?

  4. How to set the timeout period of the rpc interface?

  5. How are the microservices used in the work deployed?

  6. How to troubleshoot problems in normal times?

## Interview Question Answer

Alright guys, this is the end of this article! Regarding why the answers to the interview questions are not written directly, what I want to say is that writing the interview questions will make the article very long (it is already very long...) This will affect the readability of the article.

This article is shared with friends who need to interview and brush up questions, and I wish you all the best to get the offer you want. This information mainly includes Java basics, data structures, jvm, multithreading, etc. Due to limited space, only a small part is shown below. Interview questions, friends who need the full version can click a link to jump to receive, link: click here to download for free, get code: CSDN

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41770757/article/details/112852678