Passing the First Round at Toutiao: Real Interview Questions and Solutions
A detailed walkthrough of a friend's first‑round interview at Toutiao, covering self‑introduction, project deep‑dive, OS scheduling, TCP reliability, SQL join, and two linked‑list reversal implementations, with the exact questions and code shown.
1. Self‑Introduction
The candidate gave a brief self‑introduction and was asked whether they had any language requirements for the job, noting that the role uses the Java technology stack.
2. Project Discussion
The interview focused on the most recent project, asking for the tech stack, business overview, challenges faced, and solutions applied. Specific questions included:
Why decentralization?
Pros and cons of microservices.
Benefits of using RocketMQ and comparison with Kafka, especially regarding message volume and latency.
How to guarantee message reliability, idempotence, ordering, and handling of node failures.
Understanding of vector clocks.
Explain the full lifecycle of a Java source file to garbage collection.
Relationship between JVM stack and threads, and common JVM troubleshooting tools.
3. Operating‑System Questions
Four OS‑related questions were asked:
Familiarity with process scheduling strategies.
Explanation of the Completely Fair Scheduler (CFS).
What “friendliness” means in this context.
How the friendliness metric is calculated.
4. Computer‑Network Questions
The interviewer probed TCP reliability beyond the three‑way handshake and four‑way termination, expecting discussion of ARQ, sliding windows, congestion control, flow control, and timeout retransmission. Additional prompts asked about basic communication requirements and point‑to‑point characteristics.
5. Hand‑written SQL
A practical SQL task was presented: given a student name, retrieve that student’s grades across subjects using two tables (student and grade). The interviewee initially omitted the subject column, prompting the interviewer to ask why the no column was kept.
6. Algorithm – Linked List Reversal
The candidate was required to reverse a singly linked list. Input example: {1,2,3}; expected output: {3,2,1}. Two solutions were provided.
// Iterative solution
class Solution {
public ListNode* ReverseList(ListNode* pHead) {
if (pHead == NULL) return NULL;
ListNode* pNode = pHead;
ListNode* pReverseHead = NULL;
ListNode* pPrev = NULL;
while (pNode != NULL) {
ListNode* pNext = pNode->next;
if (pNext == NULL) pReverseHead = pNode;
pNode->next = pPrev;
pPrev = pNode;
pNode = pNext;
}
return pReverseHead;
}
}
// Recursive solution
class Solution {
public:
ListNode* ReverseList(ListNode* pHead) {
if (pHead == NULL || pHead->next == NULL) return pHead;
ListNode* pReverseNode = ReverseList(pHead->next);
pHead->next->next = pHead;
pHead->next = NULL;
return pReverseNode;
}
};The recursive method leverages the call stack to reach the tail node, then rewires each next pointer on the unwind. The author notes common pitfalls: handling NULL or single‑node lists and avoiding broken links during reversal.
Summary
The interview covered a broad range of topics typical for a Java‑focused backend role at a large internet company, testing both conceptual understanding (decentralization, CFS, TCP reliability) and practical coding ability (SQL join, linked‑list reversal). The detailed questions and code snippets illustrate the depth of preparation required.
Java Backend Full-Stack
Provides technical guidance, interview coaching, and tech sharing. Follow and reply '77' to receive our self-made 'Interview Cheat Sheet' and interview resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
