2020 is coming to an end, and the job-hopping season is coming again. It just so happens that several readers have recently received offers from Tencent and Ali. Under my brazen questioning, they finally revealed the details of the interview questions to me.

Bigo interview

The first reader successfully won the offer of BigO and Tencent after more than a month of reading and reading. This reader was also a 985 top student before, but he has been working in a small company. He talked with me before and revealed that he wanted to go to a big factory.

Bigo side

For the first part, I think it is quite basic. It is aimed at some basic problems of Java and SQL, and then extended the experience of using and tuning JVM corresponding to production to see if it is really done and solved.

How to analyze memory leaks? How do you know the entire memory leak link?

In general, Jmap dumps dump files and then uses some tools such as MAT to do specific analysis.

What garbage collector do you use? How long does GC take? How often is Full GC online?

Garbage collector is relatively simple, back endorsement can be, and then the frequency of GC this is based on the current company scenario for example.

How do I tune the JVM?

A little bit about JVM tuning parameters, usage and so on, and then the process of finding problems and finally tuning JVM parameters with a question on the line.

Has ConcurrentHashMap been used in the project? ConcurrentHashMap (ConcurrentHashMap)

CAS+synchronized change, get, put, resize process

Do you know the difference between JDK7 and 8

We talked about Stream API usage, lambda expressions, changes to the HashMap header and tail, and changes to the ConcurrentHashMap implementation.

Have you ever used Stream? Tell me

According to the peacetime use said good, relatively simple.

SQL optimization experience

Also relatively simple, usually used some slow SQL optimization experience said on the line, but usually to have a summary, otherwise it will be a stick west stick hammer.

Algorithm, list addition

General answers, brush questions.

Bigo 2 face

The second interview will be a bit biased towards the middleware, inspected the details of the project, will be asked very detailed, and then the other questions are reading books to know, although it is not difficult, but still need to read more, more summary.

Deep excavation project

The project must be well prepared, every detail point, there is a question to think more, otherwise it will be very embarrassing when asked.

Talking about ES, what if there’s too much data in the ES document?

Basically, I have explained all the points of ES, and it is almost OK. Because I am engaged in search business, there are many problems in this part.

RocketMQ cluster principle, how to stack messages, the advantages and disadvantages of push and pull mode?

Also read the book, and the solution to stacking can be found in my MQ article series.

Raft protocol?

Let’s talk about the main working principles, such as Leader election and log replication.

Distributed ID design?

Many, snowflake algorithm, domestic United States, Didi, Baidu open source remember one or two can, and then find a talk about the principle of implementation.

A relatively simple algorithm, the impression is not very clear, but vaguely remember is to test concurrent toolkit design

Bigo on three sides

This is the end of the technology, probably the boss, so there are not a lot of technical problems. It is aimed at the way of thinking of individuals, and the ideas and ideas of solving problems at ordinary times.

Redis clustering features, distributed lock design?

This is generally nothing to say, the endorsement endorsement, distributed lock is a platitude of the problem.

I asked about the project structure and difficulties

Buckle details again, usually to understand deeply.

The algorithm is a dichotomy of the problem, not difficult

Bigo interview summary

Generally speaking, the difficulty of the interview is general, and they are all questions that can be seen on the Internet, but they must be able to win the offer smoothly.

Tencent’s interview

Because readers have already taken the offer of BigO, the following Tencent interview is also more confident, at least one offer for the foundation. However, Tencent asked a very wide range of questions, the speed of questions is also very fast, if the clear words, immediately start the next question… .

Tencent side

HTTP/HTTPS, network security problem?

To explain their differences, Https communication mechanisms, certificates, keys to ensure security some things.

The difference between volatile and Synchronize?

Eight-part essay, back!

JAVA memory model?

JMM has a set of rules, working memory, main memory, atomicity, visibility, orderliness, happens-before, etc.

Redis distributed lock?

This is very simple, we will, in addition to say and ZooKeeper implementation of some differences, the actual application process.

Innodb about?

Just say what you know, row locks, MVCC, foreign keys, consistency read something.

ZAB about?

Take the whole ZAB protocol process, the process of electing, discovering, synchronizing, broadcasting.

How to divide the database and table?

In fact, this still need some experience, there is no corresponding to the order of magnitude of the project may still rely on endorsement, refer to my sub-database sub-table article.

How to achieve IOC yourself?

If you’ve seen the implementation, this is pretty easy.

What design patterns have you used? Tell me?

Give some examples of common patterns and how they are used.

How do you tell if a linked list has a ring?

Just brush them.

Kafka, Redis, Zookeeper, ES, and computer networks have all been asked, some of the answers are not very good, but still passed.

Tencent’s second interview

This side is better than the last side, there are not so many problems, the feeling is a little easier than the first side, there are some simple problems I can’t recall, the project problems, I have been very familiar with.

Introduce yourself?

Be prepared to introduce yourself, not too long, not too short, a few sentences about your career, key projects, and skills.

Digging into the project, I asked the design of the commodity list, what are the highlights of the project, or what are the defects, how to improve, how many concurrent and so on?

Project again, dig deep. There’s nothing more to say.

ES goes all the way through, including fundamentals and optimizations, right?

I said it again.

How to generate distributed ids?

Same old problem.

Talk about projects again, distributed transactions, data consistency?

It’s a cliche to ask in an interview. Two-phase, three-phase commit, TCC solution, strong consistency, final consistency, etc.

Why use framework to do distributed, no line?

This kind of open question, say oneself train of thought line. Give examples of issues such as service governance, service choreography, degradation that a framework such as Dubbo solves.

Tencent summarizes

Tencent interview is more comprehensive than BigO, more investigation is the principle and use of middleware, as well as some of the conventional solutions under the distributed system, usually these knowledge points have encountered, but to sum up more. Feel down, the overall difficulty is also average.

Throw in well quickly

The readers were very good, and at the end of the interview, they also sent me a quick round of interviews.

Database connection is not up, how to check?

Or to see the problem of train of thought, such as whether the network is normal, whether the database service is normal, authority and other factors.

What are the benefits of parental delegation models?

Talk about the principle, the benefits of safety, avoid reloading and so on.

ThreadLocal about?

You can tell if you’ve seen it.

One interface call, print “kuaishou “+ time in log file, such as “kuaishou 20ms “, “kuaishou 50ms”, “kuaishou 100ms”, there are 100,000, using Linux command how to find the 10 shortest time?

I don’t know, and then the interviewer kept forcing me to write it by hand… .

Install a software, how to find its path in Linux?

I said whereis.

How to check thread state in JVM?

The jStack process ID will do.

What’s the difference between CountDownLatch and CyclicBarrier?

This has seen to know, specific can see my article has written.

Jps-m, jPs-L used before?

-m can output the main function parameters, -l can output the full package name.

What is the underlying implementation of Spring transactions?

This problem also want to read the source code, AOP dynamic proxy implementation.

Algorithm: a mirror image of a tree, cannot be written recursively.

Again, finish the task.

Well quickly summarize

Quick hand problem, um… It’s weird, and then it’s not too much of a problem… One round.

conclusion

To sum up, they are basically the knowledge points that are often tested. If you know them, there are basically no big problems, and you also need to have practical experience in production and think about how to solve the problems. Bigo and Tencent have answered all the answers, which is the fail-fast of kuaishou.

If quick hand side you come, will hang up?

Readers are so strong, don’t you want to add a group to take a look? Add my friend, note “into the group”, come in to study, and the last 50 people full group!