www.cnblogs.com/balloonwj/p…

I left my last job in December and was interviewing for most of the year until March.

First, let me explain the background: coordinate Shanghai, do technical development, MY interview position is Linux server development, the most preferred position is server development main engineer or technical manager. I was also the interviewer of the previous several companies. In the next few years, I was faced with getting married and reaching a technical bottleneck. Although I got a lot of offers, I wanted to make a comprehensive comparison, so I took part in a lot of interviews. I went to the following companies: Tencent, Baidu, Ele. me, IQiyi, 360, Ctrip, JD.com, Huawei, Bilibili, Shanghai Gold Exchange, Oriental Fortune, Zilliz, Zhangmen Group (the one that makes wireless master Key), Ximalaya Listening Book, Fengguo Network, Wall Street News, Wind Finance, Huizheng Finance, Daowu Network, Chaoyang Yongsheng, There are also a few small companies or startups.

In order to avoid unnecessary disputes, I will not name the specific company below. Technical interview details I try to write a bit more detailed, I hope to have reference value for you, technical interview roughly have three situations:

1

Experience sharing

1. Represented by Baidu and IQiyi, data structures and algorithms are the main ones.

The first is a brief overview of your previous work experience and project experience, followed by questions on algorithms and data structures, covering the following topics:

01

Quick sort

Quick sort (including algorithm steps, average algorithm complexity, best and worst case), some people say that the school recruit to write out the algorithm, I am the social recruit, so describe the algorithm steps.

02

Binary search algorithm

Write binary search algorithm, although this is a social recruit, but is generally not difficult, so ask candidates to write it. But a lot of companies, for example, don’t ask you to write an algorithm directly, they ask you questions about a specific situation, and then ask you to think of binary search, like finding the square root of a number.

03

The list

Linked lists, common interview questions are to write a linked list to delete a node algorithm, single linked list inversion, two linked lists to find the intersection of the part, this generally must be completely correct to write.

04

Implement some basic functions yourself

Implement some basic functions yourself, such as strcpy/memcpy/memmov/atoi. Similarly, these should be written completely error-free and efficiently. For example, if your implementation allocates heap memory dynamically, this question will be considered wrong.

 

The third and fourth point is generally to examine your code style, the handling of boundary conditions, such as whether the pointer is null, do not deliberately consider this situation, even if you know it, as long as you do not write, generally the interviewer will think your thinking is not thorough, low error tolerance rate; For example, if a single list is inverted, the return value must be the inverted head of the list, so that a list can be referenced. These are the key points that the interviewer wants to consider.

05

Hash table

Hash table, the details of the hash table requirements are very high, such as the hash table conflict detection, hash function commonly used implementation, algorithm complexity; For example baidu second surface let me write a hash table insert element algorithm, element type is arbitrary type.

06

AVL tree and B tree concept, details

AVL tree and B tree concept, details, such as mysql database index implementation principle, basically equivalent to asking you B tree.

07

Red and black tree

Red black tree, a data structure that is basically a must ask, including the concept of red black tree, average algorithm complexity, best worst case algorithm complexity, left and right rotation, color transformation. Are you familiar with the STL of C++? You said you are familiar with it, ok, have you used STL map? Yes, ok, so how is map implemented? Red black tree, ok, so what is a red black tree? So the question red black tree begins. Java is similar.

Second, represented by Ele. me, Bilibli, Ximalaya, 360, Ctrip, etc., give consideration to algorithm data structure and other development technologies.

Algorithms and data structures have been mentioned above, but other technologies are mentioned below, which generally include the following:

01

Basic C++ problems

Take the C++ language as an example (not C++ development friends can skip this point), the first type is basic C++ problems, common C++ inheritance system virtual keyword role (such as inheritance relationship why destructor to declare virtual function, The order in which constructors and destructors are executed when parent and child classes are involved, the arrangement of the class’s member list in the address space when multiple inheritance is involved; The function of static keyword, static_cast/reinterpret_cast/dynamic_cast and other conversion scenarios; The most common question is the layout of virtual tables, especially the spatial structure distribution of each object in diamond inheritance (B and C inherit A, D inherit B and C), for example, how many virtual tables does D have, and the member space arrangement of B and C in D.

 

On the other hand, if you’re applying for a position that uses C++ development, many companies will ask you about C++11 (or boost libraries, basically the same thing). C++11 (JAVA and other language readers can ignore) :

Auto keyword, for-each loop, rvalue, and move constructor + STD ::forward + STD ::move + STL container added emplace_back() method, STD :: Thread library, STD :: Chrono library, intelligent pointer series (STD :: shareD_Ptr/STD :: Unique_Ptr/STD :: Weak_ptr) (the implementation principle of intelligent pointer must be known, It is best to implement), threading library STD: : thread + thread synchronization library STD: : mutex/STD: : condition_variable/STD: : lock_guard, lambda expressions (now also often examine lambda expressions in JAVA), st D :: Bind/STD ::function library, others are the use of keywords (override, final, delete), and details such as the ability to initialize values at class member variable definitions, as JAVA does.

02

Network communication problems

Network communication issues, such as stack hierarchy, three-way handshake and four-way wave, note that I’m talking about details, such as CLOSE_WAIT and TIME_WAIT states (Bilibili asked this question, you can get a feel for it: After A normal connection is established between A and B, no data is sent to each other. At this time, B suddenly restarts. What is the TCP status of A? How do I eliminate this state in the server program?

How to write asynchronous connect function, how to use select function, the difference between epoll and SELECT function, how to write asynchronous connect function, how to use select function, how to use epoll and SELECT function. Basically, whenever epoll is asked, it is necessary to ask the difference between horizontal mode and edge mode of epoll; Some socket options, nagle/Keepalive/linger options, etc. TCP/UDP differences and application scenarios; How to design communication protocol to avoid sticky packet; HTTP: get/POST HTTP: get/POST HTTP: get/POST Windows users may be asked to complete the port model (IOCP), network communication questions, I specially opened a zhihu live system to summarize the summary, interested friends can see here: https://www.zhihu.com/lives/922110858308485120 and here: https://www.zhihu.com/lives/902113324999778304.

In short, network communication problems can be as clear as possible, at least the TCP application layer of the various socket API usage details clear.

03

Operating systems are primitive things

For example, the section structure of elf files under Linux, which segments are mapped to the process address space, and related issues include: where global variables are statically stored in the process address space; The structure of the stack and heap, stack, stack to special details very clear, because some technical requirements for higher company will ask more deeply, such as jingdong let me write on one side of a sum function from 1 to 100, then let me write this function assembly code (JAVA development students may let you try to write the JVM instructions). If you are not familiar with the structure of the stack (such as the order in which function parameters are added to the stack, the layout of local variables in the stack, and the position of the pointer to the stack frame and the pointer to the top of the stack), you will not be able to answer this question correctly. The stack problem can be asked in the same way as a common function call, which has the following differences: __cdecl/ __stdCall / __thisCall /__fastcall, for example, why can’t a function like printf use __stdCall with undefined arguments; There is also the connection and difference between process and thread. The most asked is some synchronization technology between threads, such as mutex, semaphore, conditional variables, etc. (Windows also has events, critical sections, etc.), these things you must be familiar with the specific API function level. From another perspective, This is one of the most common things we use in actual coding, and if you can’t use it proficiently, you’re not a good developer. Such questions can also be extended to why deadlocks are used and how to avoid deadlocks; Common communication techniques between processes also need to be mastered. Common communication methods (under Linux) include shared memory, anonymous and named pipes, sockets, message queues, etc. Pipes and sockets are two research points that must be thoroughly mastered (with the above network communication a little repeat). On Linux you might also ask what a daemon is, how a Daemo is created, what a zombie is, and how zombies are created and eliminated (bilibili asked).

CAS mechanism (I asked you in the second interview)

04

Used open source technologies

The fourth category is a used open source technology, such as Redis, which represents NoSQL technology; Network library Libevent and so on; Something about a database like mysql. This general do not do hard requirements, but here must be emphasized is REDis, skilled use of Redis and even studied redis source code, is now generally do background development of technology standard or indispensable part, based on redis interview questions can talk about algorithms and data structures, can also talk about a network framework and so on. More than 90 percent of the companies I interviewed asked about Redis, with varying degrees of depth. For example, Ximalaya asked about redis data storage structure and Rehash. Bilibili asked about redis transactions and clustering.

Only ask about business or project experience.

These companies do not have high technical requirements (except for senior and executive development), as long as your past projects are a match for the current position, you can come to work directly, of course, the salary will not be a lot. For example, game companies will care if you have experience in game development. Stock companies will care if you have experience in developing securities or trading systems. My experience is this kind of company, if you can go to go, if you can’t go to accumulate interview experience. Business development can be found everywhere, the real emphasis on technology companies, should be the majority of technology, especially junior and intermediate development of friends should be worth caring about things.

Fourth, unreliable company.

I came across four broad categories:

01

Put on the X cheat type

The first type: install X flicker type

Interview process cumbersome, such as claiming to only send every one hundred resumes in an interview invitation, as every one hundred candidates sending an offer, so-called style in silicon valley, a company is like this, I interview first round long telephone interview, followed by five rounds of technical interviews, on the first three rounds is brush leetcode original topic, then after several rounds of interview, From basic operating system interruption, GDT, LDT, table paging mechanism, the interviewer asked about the architecture of high concurrency and massive data, which was not nice. It was really from outer space to inner womb, and finally when asked about the specific position, he would either be secretive or reveal his prototype. Or when discussing salary, or a face of embarrassment or all kinds of cake, but the actual pay is not much.

02

Buddha company

The second category: Buddha nature companies

The interviewer smiles throughout the interview, asks you questions and the interviewer agrees with you, but in the end you don’t pass. I guess either the company is not short of people and they want to see if they have the right talent. Or the salary listed in the job Posting is not available.

03

Granny wrap company

The third category: granny cloth-binding companies

Is characterized by the interview cycle is long, often in the first round interview you, let you go back to wait for ten days after half month, give you to phone you a second interview, interview is required to wear a suit, take all kinds of certificates, before the interview must first check your id card, education certificate, degree certificate, and even the cet certificate, etc., trouble, even if you are way over the surface, They don’t pay much. Everyone has families to feed and jobs to find. Who has the time to spend ten days and a half with you?

04

No respect for people type companies

Category 4: Companies that don’t respect people

I here don’t respect people, not referring to the interview process for your personal attacks, but not according to your working years experience and random arrangement of the interviewer, for example, for example, if you work for ten years, you go to interview a position as a technical director, the other will arrange a staff work less than two years as the interviewer, the interviewer if it is through the motions can understand, But there’s no need to argue with you about technical details like binary displacement and whether modern compilers should prefix the virtual keyword to subclass destructors. Another type is deliberately asking some tricky questions, or the audience is absent-minded, playing with the phone, inattentive interviewer, such as asking you how many TCP header fields, each field is what. My rule of thumb with this type of interviewer is to either decline or fight back.

2

Attention to detail

Here are some details to pay attention to during the interview:

01

Take the long view

First, if your working years are not long, especially the desire to have certain attainments in the technical aspects, so you should first consider whether the new unit can be conducive to your technical growth, rather than two same jobs, the salary difference between the upper and lower three thousand, five thousand or six thousand. If you want to make a career change (from client to server, from C++ to JAVA, for example), don’t resist the pain of a sudden lower salary. Take the long view.

02

You may end up being rejected because you don’t make enough money

Second, some companies may say the most they can offer, but even if you do a great job in the interview, you may end up not being hired because you don’t pay enough.

03

Get more experience with interviews

Third, if you have the time, it’s not a bad thing to interview for experience with companies you don’t want to work for.

04

Beware of the technical ceiling

Fourth, during the interview, you are also inspecting the interviewer. Generally, you can answer about 80% of the questions the interviewer asks you. Such a company can consider joining the company, so that you may have some improvement in technology. If you beat the interviewer to the punch, your technical ceiling is probably there, too.

05

Talk about your future position

Fifth, be clear about your future position during the interview, and avoid going in for something you don’t want to do.

06

Try to communicate with the interviewer

Sixth, do not directly deny yourself the interview questions, you can try to communicate with the interviewer, or ask for some tips or ideas.

07

Don’t underestimate the mathematical intelligence questions in the written test

Seventh, do not despise some mathematical intelligence questions in the written test, seriously answer, try to ask the algorithm is not also mathematical intelligence questions?

08

confident

Eighth, be confident that everyone’s experience is unique. Don’t be too concerned if you can’t answer questions in specific areas during the interview.

 

Hope to be helpful to reading friends. Because of my limited experience and ability, what I said may only be one person’s opinion. If something is inappropriate, please kindly put forward suggestions.

Welcome to the public account “easyServerDev”. If there is any technical or professional problems need my help, can contact me by the public, the public, not only share stories, high-performance server development experience, and at the same time also free for the general technology to answer friends to provide technical and professional solutions, do you have any question can leave a message on WeChat public directly, I will reply you as soon as possible.