Alibaba DingTalk Server Development Summer Intern Interview
The interview was done by DingTalk phone/video call, and the hand-written coding part was completed through Alibaba’s online platform.
There were two algorithm questions:
Implement the data structure for a doubly linked list.
twoSum: find the indices of two numbers in an array whose sum equalstarget.
The difficulty was around LeetCode Easy. But during the interview, I needed to ask questions and communicate with the interviewer to clarify the problem. The interviewer also cared a lot about code cleanliness and efficiency, such as parameter validation and assumptions in the implementation.
1 | //评测题目: 实现一个简单的双向链表,要求完成 node和list的构造函数,以及 list类的void push_back(node*), void remove(node*) 方法 |
My main programming language is C++, so the interviewer asked many C++-related questions.
From my resume, he looked at my GitHub profile and asked which project I wanted to introduce the most. I introduced the compiler I implemented in my junior year. Then he asked about some compiler processes and data structures, such as lexical analysis, parsing, intermediate code generation, target code generation, optimization, symbol table, and DAG optimization.
In C++, how does the compiler distinguish >> in input from >> in nested templates? I answered that it should be distinguishable during parsing. Then we talked about some history around this: in the past, >> in templates had to be written as > > to compile.
Implementation of the C++ HashMap container, and how a hash value is mapped into buckets.
How vector expansion is implemented in STL.
The difference between new and malloc.
Move semantics and rvalue references.
The differences among weak_ptr, shared_ptr, and unique_ptr.
What I am usually interested in, especially advanced data structures:
Order tree and segment tree.
Implementation of quicksort and heapsort. Maintaining a min heap.
The difference between process and thread.
Types of locks and read-write control.
Linux memory management mechanism.
Common shell commands. File operations, process information (top, ps), and stack information (lldb).
TCP packet loss handling. I did not answer this well. I had forgotten a lot of the computer networking knowledge I learned in the second semester of junior year.
The 24-point puzzle: 4, 4, 10, 10, (10 * 10 - 4) / 4.
At first I thought it was a programming problem and answered “backtracking.” Later I realized it was purely an intelligence puzzle.
Career planning.