Top 30 Baidu Interview Questions Every Backend Engineer Must Master
This article compiles the most common Baidu interview questions across three rounds, covering probability functions, URL deduplication, data structures, HTTP/HTTPS, networking, Linux commands, system management, database knowledge, concurrency, distributed caching, and personal experience topics for backend engineers.
First Round
1. Implement a function that returns 0 or 1 with probabilities p and 1‑p, ensuring equal probability for both outcomes.
2. Deduplicate 1 billion URLs (each < 56 B) using only 4 GB of memory.
3. Convert a binary search tree into a doubly linked list.
4. Explain the differences between HTTP and HTTPS, and describe the extra steps HTTPS takes to ensure data security.
5. Perform IP address subnetting.
6. Differentiate between POST and GET requests.
7. Compare hard links and soft (symbolic) links.
8. Describe the DNS resolution process.
9. Explain the usage of the kill command and why a process might not be terminated (e.g., being in kernel mode and ignoring the signal).
10. List commonly used Linux commands.
11. List system management commands for checking memory usage, network status, etc.
12. Demonstrate the use of pipelines.
13. Show how to use grep for searching within files.
14. Write a simple shell script.
15. Use the find command.
16. Apply awk for text processing.
Second Round
1. Explain Linux commands such as $ (process ID) and $? (previous command exit status), and how to list processes sorted by memory or CPU usage.
2. Compare HTTP GET and POST methods.
3. Describe the epoll mechanism.
4. Discuss your knowledge of SQL databases.
5. Share examples of problems encountered in projects and how you solved them.
6. Implement a function that generates all permutations of a set.
7. Compare B‑tree and B+‑tree structures.
8. Explain hashing and how to resolve collisions.
9. Discuss inter‑process communication and the advantages/disadvantages of shared memory.
Third Round
1. List technical blogs and books you read regularly.
2. Mention useful Linux commands.
3. Describe the most frustrating aspect of your work.
4. Outline your strengths and weaknesses.
5. State whether you have considered joining a startup.
6. Write a simple strcpy function.
7. Talk about your personality traits.
8. Given a system with slow front‑end loading, explain how you would diagnose the issue.
9. Share your perspective on continuously learning new technologies.
10. Discuss difficulties faced in projects and how you addressed them.
11. Provide metrics such as system scale, PV, UV, etc.
12. Propose solutions for handling high concurrency in a distributed environment.
13. Summarize the responsibilities you held in projects.
14. Explain how Nginx load balancing works.
15. Describe distributed cache consistency and how to scale servers using a hash ring.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Backend Technology
Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!
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.
