Fundamentals 16 min read

Master Technical Interviews: Data Structures, OS, Networking & C++ Tips

The article shares the author’s interview experiences at over 30 companies and provides a comprehensive guide covering data‑structure and algorithm questions, core C++ concepts, operating‑system fundamentals, networking protocols, open‑source tools, project‑experience expectations, and practical advice for evaluating both technical and non‑technical aspects of potential employers.

21CTO
21CTO
21CTO
Master Technical Interviews: Data Structures, OS, Networking & C++ Tips

The author, a senior developer in Shanghai, recounts interviewing at more than 30 companies and distills the experience into three main interview focus areas.

1. Data Structures and Algorithms

Many IT companies, such as Baidu and iQIYI, emphasize data‑structure and algorithm skills. Typical topics include:

Quick sort : algorithm steps, average/ best/ worst‑case complexity; description is usually sufficient for senior hiring.

Binary search : write the algorithm or apply it to a concrete scenario, e.g., computing a square root.

Linked list : delete a node, reverse a singly linked list, find intersection of two lists.

Implement basic functions like strcpy, memcpy, atoi, ensuring correct handling of edge cases and efficiency.

Hash table : collision handling, hash functions, complexity; interviewers may ask you to implement insertion for arbitrary types.

AVL and B‑tree : concepts and details, often linked to MySQL index implementation.

Red‑black tree : concept, complexity, rotations, and how STL map is built on it.

2. Operating System Principles and Core Technologies

Companies like Ele.me, Bilibili, and Ximalaya also test OS fundamentals, networking, and library knowledge.

Basic C++ topics frequently asked:

Purpose of virtual in inheritance, destructor behavior, construction order, multiple inheritance layout.

Use cases of static, static_cast, reinterpret_cast, dynamic_cast.

Virtual table layout, especially diamond inheritance and number of vtables.

For C++11 and modern libraries, interviewers may probe: auto keyword

range‑based for r‑value references and move constructors std::forward, std::move new STL methods like emplace_back(), std::thread, std::chrono smart pointers ( shared_ptr, unique_ptr, weak_ptr) and their implementation

thread synchronization primitives ( std::mutex, std::condition_variable, std::lock_guard)

lambda expressions std::bind, std::function Network communication questions often explore TCP/IP details, socket APIs, and protocol nuances. Example:

A and B established a normal TCP connection but never exchanged data; B reboots. What state is A in, and how to clear it?

Other typical topics include congestion control, TCP/IP header fields, blocking vs. non‑blocking sockets, asynchronous connect, select vs. epoll (edge vs. level mode), socket options (Nagle, keep‑alive, linger), TCP vs. UDP, packet‑framing, HTTP GET/POST differences, and Windows I/O completion ports.

OS fundamentals covered in interviews:

ELF file sections and their mapping to process address space.

Location of global and static variables.

Protection mode, real mode, interrupt vector tables, CAS instructions.

Daemon processes, zombie processes, and their creation/cleanup.

Understanding stack vs. heap, calling conventions ( __cdecl, __stdcall, __thiscall, __fastcall), and assembly representation of simple functions is often required.

Process‑thread differences, synchronization mechanisms (mutex, semaphore, condition variable, Windows events), deadlock causes and avoidance, and inter‑process communication methods (shared memory, pipes, sockets, message queues) are also common.

Open‑source technologies frequently examined include Redis and MySQL; deep knowledge of Redis data structures, rehashing, transactions, and clustering is especially valued for backend roles.

3. Project Experience

Interviewers may simply ask about past projects to verify relevance to the target position; senior or managerial roles may probe deeper technical depth.

Unreliable Companies

Four typical problematic company types encountered:

Show‑off companies : overly long interview processes with irrelevant or overly theoretical questions.

“Buddha” companies : friendly interviewers but low salary offers.

“Old‑lady‑wrap‑foot” companies : excessively long hiring cycles, demanding extensive documentation, and low compensation.

Disrespectful companies : mismatched interviewers, trivial or overly nit‑picky questions, and lack of genuine interest.

Beyond Technical Aspects

Additional considerations when evaluating offers:

Prioritize technical growth over small salary differences, especially early in your career.

Be aware that some companies may reject you for salary expectations even after flawless interviews.

Interviewing at less‑desired firms can still provide valuable experience.

Assess interviewers: if you can answer ~80% of their questions, the company may offer good learning opportunities.

Clarify future role responsibilities to avoid unwanted tasks.

If you don’t know an answer, seek hints or discuss your thought process instead of giving up.

Take written math or logic tests seriously; algorithm questions are essentially mathematical puzzles.

Maintain confidence; every candidate’s background is unique.

These insights, drawn from interviews with 30+ companies, aim to help readers navigate technical interviews more effectively.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLinuxOperating Systemstechnical interviewData StructuresNetworking
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.