Byte Beat Java Engineer Agency Recruitment Interview: redis+MySQL transaction+Linux+algorithm

one side

1. Ask about project experience and details;

2. How does the task system ensure that the award will be successful after the task is completed?

3. How does zset delay queue work?

4. What are the data structures of redis? How are they achieved?

5. Persistence of redis;

6. mysql index;

7. An unordered array finds the largest sum of its subsequences, and requires that the elements in the subsequence are not adjacent to each other in the original array


Two sides

1. How is ZSET implemented in Redis? Try to introduce as much as possible, jump table plus hash table and compressed linked list

2. When Redis's ZSET is used for ranking, how to achieve chronological sorting when the scores are the same? Said a method to split the score into high 32 bits and low 32 bits, the high 32 bits store the score, and the low 32 bits store the time. Ask if there are other ways;

3. Four isolation levels for MySQL transactions? First talked about the difference between the four levels, and then talked about the possible problems of each level

4. Are the binlog and redolog logs clear? Said the role of two logs and two-phase commit

5. How to realize dynamic polymorphism in C++?

6. Can the constructor of C++ be a virtual function?

7. The missing first positive number;

8. In the Linux system, can an opened file be deleted by another process?

9. A buffer of 10M size is full of data. Now we need to send out the data in this buffer as much as possible to allow partial packet loss. Is it better to use TCP or UDP? why?

10. What protocols are involved in a complete HTTP request?


Three sides

1. Ask the project

2. How is redis ZSET implemented?

3. What should you do to design a current-limiting system?

4. How do you design a delayed task system? Speaking of two solutions, one is to use redis ZSET to achieve, consider fragmentation to resist high concurrency, use redis persistence to achieve landing, and use redis sentinel to achieve failover. One is the method of using the time wheel.

5. There is an existing random number generator that can generate numbers from 0 to 4. Now you need to use this random number generator to generate random numbers from 0 to 6, ensuring that the generated numbers have a uniform probability.

6. There are N pieces of chess, and each person can get 1 to M pieces at a time, and whoever gets the number of pieces of 0 will win. Now there are 1000 pawns, and you can take up to 8 pieces at a time. A is taken first, so does A have a winning method? If the number of pieces remaining after the first person finishes is a multiple of 8, he must win, otherwise he must lose.

7. Given the root node of a binary tree, there are now some nodes of this binary tree, and the nearest common ancestor of these nodes is required. There is an original question on this bully question, you can check it out: NC102 find the nearest common ancestor of two nodes in the binary tree

Interview question answer, how to get

If you need to get it, it’s troublesome to get it with one-click triple connection + comment, then add VX (tkzl6666) to get it for free

Guess you like

Origin blog.csdn.net/m0_46874920/article/details/112993472