Introduction
Hello everyone, I am A Gan, the founder of “Running Cpp / C++” on Knowledge Planet.
Today, I would like to share with you the interview experiences related to C++ positions that our community members have organized and are continuously updating.
This is the most comprehensive collection available online.
Interview Experience Sharing
Due to the numerous interviews, I will only share a portion today, and I will continue to share more in the future (to provide a reference for everyone’s learning/interviews).
ByteDance Client First Interview
- What are C++ smart pointers, and what problems do they solve?
- What is a virtual function, and how is it implemented?
- How to implement a queue using a stack?
- TCP flow control and congestion control.
- What is a master-slave reactor, and how is data transmitted?
- (The following are network testing projects) What is the background of the project, and why is it necessary? Has it been applied in practice?
- What is the specific role of AI, and will it have a heavy load?
- What is passed to AI? How large is it? Will there be a latency in operation, and why not set a threshold in advance to output to AI if it exceeds the threshold?
- How to judge the quality of the network? Are these indicators a unified standard in current work or something else?
- Algorithm coding.
Oppo Multimedia Development
First Interview:
1. No coding test, directly discuss the project, choose the most familiar project to introduce.
2. What are thread pools and memory pools used for, and how are they implemented?
3. How is performance tuning specifically done?
4. Have you encountered memory leaks? Describe the specific scenario.
5. What are the differences between TCP and UDP, and how are they implemented?
6. Data structure-related questions: underlying implementation of map, set, unordered_map; differences between vector and list.
7. (Starting to discuss the intelligent cloud storage project) How is AI retrieval specifically done, and where is the workload if using APIs?
8. What difficulties have you encountered, how did you solve them, and describe how to quickly get started on a project.
Second Interview:
1. Again, introduce the project first, no coding test.
2. Inter-process communication and thread synchronization.
3. Questions about specific debugging scenarios encountered in my projects and how they were resolved, but no specific theoretical questions.
4. How is a distributed architecture implemented?
5. When processing signals with a GPU, have you considered the communication latency between GPU and CPU? Why did you ultimately choose GPU (my lab project)?
6. How is performance measured? Also asked again about thread pools and memory pools.
7. Have you used lambda and move semantics?
8. What do you know about Oppo?
Third Interview (HR Interview): Asked about strengths and weaknesses, considerations for the position, understanding of Oppo, thoughts on the future work environment, etc., a casual chat.
Summary: The entire process had no coding tests; I suggest doing well on the written test (I passed the written test but was asked questions I didn’t know, resulting in a lower score). The focus seemed more on whether I had genuinely worked on projects and my overall grasp of them. The timeline is generally one week for each stage.
MiHoYo First Interview
1. Self-introduction.
2. Why did you apply for this client tool position?
3. Differences between pointers and references (concepts, usage scenarios).
4. Are there pointer arrays and reference arrays?
5. What are dangling pointers?
6. What is memory leakage?
7. Differences between new and malloc.
8. How to determine if memory allocation failed with new and malloc?
9. Smart pointers.
10. Where is the reference count stored in memory?
11. Describe the memory distribution in C++.
12. When are the sizes of static area, heap, and stack determined?
13. Differences between heap and stack.
14. Why is stack allocation more efficient?
15. Safety of heap and stack.
16. The static keyword.
17. Differences between static global variables and global variables.
18. Differences between static local variables and local variables.
19. Differences between static member variables and static member functions.
20. Coding test: Implement a resizable stack using an array, without using vector.
21. Underlying implementation of map.
22. Binary search tree, balanced binary tree, red-black tree.
23. Familiar design patterns.
24. Singleton pattern.
25. Simple factory, factory method, abstract factory.
Hikvision
1. Cloud storage project:
Describe the logic of file second transmission.
Describe the logic of large file chunk uploads.
Where are chunked files stored before merging on the backend?
Have you considered storing in chunks in fastdfs?
Explain the principles of fastdfs.
Discuss AI search.
2. Weak network project:
Describe the implementation of the ICMP protocol.
Explain how eBPF is used.
What are the challenges of the project?
3. In what scenarios is the copy constructor called?
4. What is the difference between static member functions and ordinary member functions?
5. Why can’t ‘this’ call static member functions, and what is the underlying principle?
6. What design patterns do you know?
7. Describe how you implemented a specific singleton pattern in your project.
8. Have you used thread pools in your projects? How were they configured?
9. How are condition variables used? Why are they used in conjunction with locks?
10. Have you ever written a network library?
11. How to implement a Reactor?
Knowledge Planet Introduction (Recognized Cpp / C++ Learning Hub)
Planet Name: Running Cpp / C++
The services inside will remain unchanged, with four commitments:
1. I will review everyone’s check-in content daily and provide reasonable suggestions.
2. If anyone needs resume guidance or feels lost and needs counseling, one-on-one coaching can be scheduled on Saturdays.
3. The Q&A chat every Friday night at 9 PM will remain unchanged.
4. Once you join the planet, if there are any other activities or services in the future, they will be free (reasonable fees may be charged for maintaining the planet, but no exploitation, maintaining our original intention).
(Also includes exclusive confidential materials that have stood the test of time).
Members who join the planet can ask questions and schedule one-on-one help with resumes, career planning guidance, and clarifications. High-quality projects and learning materials are also available.
