In fact, the interview should be treated differently. The veteran and the new have their own characteristics in different directions, including their rich experience, comprehensive vision and so on, as well as the new spirit and new ideas.

I have collected a lot of powerful materials, as well as interview related materials, including Python, artificial intelligence, the Web, data analysis, crawlers, from basic to professional private letters I can

1. Basic part

There is not much difference here: threads, processes, coroutines must be asked; Differences and connections among the three, application scenarios; What’s special about Python; Have you used coroutines in Python, how is it implemented, how is it implemented in Asyncio, how is scheduling implemented between coroutines?

The role of metaclasses;

How to realize dynamic loading;

How to debug in real time;

What is changeable and immutable, and why it is designed in this way;

How to understand Python’s everything objects;

Lambda functions, how to think about it;

What an iterator is, what next and iter are;

How to garbage collection, what will be memory leakage, how to troubleshoot;

2. Sorting part of the algorithm

There’s nothing to say here, LeetCode. As for how to brush, I think zhihu said good, the first time directly look at the answer, according to the answer hand to understand; Be familiar with common data structures/algorithms before doing the questions. As for which questions to do first, I think it is not necessary to be familiar with data structures and common algorithms first. Then you can do Tencent 50, or hot interview questions;

If you know the data structure, then recommend a big god: [Labuladong algorithm cheat sheet](Labuladong algorithm cheat sheet). After r reading you will find, what bullshit algorithm, are templates, directly into the set on the line. Backtracking, dynamic programming, binary, binary trees, dual Pointers, sliding Windows… It’s worth watching every day. It’s awesome

Writing LRU by hand (LRU is not very frequent, it is almost mandatory, and it is often written by hand, python is easy to use With OrderedDict)

Handwritten stack;

Find the median, or something like a topK problem (heap sorting, or quicksort idea)

Single linked list sorting;

Handwriting bubbling, how to optimize;

Large file/mass data processing, this is also very frequent, recommend special search for this aspect, basically is the idea of divide and conquer, hash table, tire tree, or AC automata, Bloom filter. Read two more articles to understand, there is nothing to say

How to design URL short chain, such as the one shared by Weibo (diyin ask)

Right view of binary tree;

The KTH bit of the list is flipped;

Three numbers of the sum of the advanced version: three numbers of the addition, subtraction, multiplication and division, this problem I did not want to come out, kneeling directly.

Basically, they are common LeetCode questions of medium difficulty and below. Simple questions will ask how much time and space complexity of such implementation and how to optimize it

3. Basic part of network

This ask is not much, may be my sample is less, of course, also have to prepare, in case the time can not say, it is basically cold.

Shake hands, wave hands, time_wait are all required, nothing to talk about

HTTP version, common header, HTTPS introduction

Nginx introduces several processes, why so fast;

Uwsgi, what it does;

How fast is epoll? By the way, red and black trees, like left and right, color change, and AVL, why everyone uses this;

4. Database

This is the most important part. It’s too high or not

MySQL, Redis, MQ/KAFKA

The first is MySQL,

ACID c.

The level of transaction isolation, what is the default, and what is meant by illusion;

How to optimize? Related to the sub-database sub-table, slow query how to see, explain which field can see whether to use the index; The left-most prefix matches first; Principles for indexing;

CPU high should do;

MySQL > select * from B+ tree; What is the difference between a primary key query and a non-primary key index query?

Hash index;

What is clustering index;

What are the advantages of b-trees? What kind of scenarios do you use b-trees for? (memcache)

The concept of sector, node size, why the height of the tree is low;

What’s the difference between InnoDB and MyISam, storage?

How do you view foreign keys, pros and cons;

redis

(This is a lot of questions, maybe because I said I read the source code of Redis.)

What are the common usage scenarios?

Why do fast? Whether single threading is a cause or effect;

How is publish-subscribe different from MQ, such as rabbitMQ?

Leaderboards, people concerned with what to achieve; If I want to range, what do you recommend;

Dict low-level implementation, rehash; Trigger condition;

Zset bottom implementation, skip table talk about;

The characteristics of SDS, why so designed;

Elimination mechanism, approximate LRU, why so designed;

Two persistence application scenarios, what are the disadvantages of RDB and what will be used by default?

How to do if aOF file is too large;

Cluster: you know several ways, cluster characteristics, master and slave synchronization, hash slot concept, is how to dynamically expand;

Have you considered the abnormal situation, such as the master network disconnection, the election of a new master, the original master restored?

How to design distributed locks

Redis double write, write database first or cache first? What are the problems and how to solve them?

Strong consistency requirements, do you want to use caching?

MQ/KAFKA

(This should be based on your project experience. Use it frequently.)

When queues are used;

RabbitMQ versus Kafka;

How to ensure that messages are not lost/reused (Basic required test)

What is Kafka’s concept of partition;

Linux part

Search for object string in multiple files, such as cat find, awk

That’s one of the few questions I ask

5. Project section

This one is different for everyone.

My words are RBAC authority model asked a lot, whiteboard design of a company’s authority system, how to design the database;

Django/flask difference;

Why Tornado is fast;

Flask request context and application context.

Celery tasks lost encountered? How to ensure high availability;

To be supplemented…

6. docker+k8s

This, to tell the truth, I have no experience, but this is basically a required content, often asked is how to arrange docker, etc., recommend to search several articles carefully prepared, here I will not make a fool of

Interview Process

Generally come up is self-introduction, you can properly play some of the things that are not on the resume, the impact is not big.

And then if you don’t have a clue or you don’t know how to answer the question, don’t just say no, but say what you understand, or what other technology you know, how to solve the problem, and guess. But t don’t pretend to know what you don’t know, if the interviewer feels that you are not sincere, that is really cool.

Also, try to steer the interviewer in the direction you are good at. Ask questions that you know for sure. For example, if the interviewer asks you how to optimize MySQL, don’t just cache/index it. Can take a specific example, a meal output, the time can not be less than 3 minutes, and then talk to each other a few questions in-depth, 10 minutes passed.

For the final question, prepare some questions in advance. The purpose of the question is to let the interviewer know that you are really looking forward to joining the team and make him feel that you will join as long as he gives you an offer.

HR face, do not imagine HR is too bad, do not kneel lick, put her as a colleague in the future is OK, neither humble nor pushy, here do not leave ye leave ye place