Baidu Spring 2021 internship C++ software development experience

After receiving the news that Baidu had passed the written test, I made an appointment for an interview, which was set at two o'clock in the afternoon on the 28th. But the actual time was advanced by an hour, and the interviewer took the initiative to ask me for an early interview.

  1. The first is a simple self-introduction
  2. Code assessment: I shredded the hash table. I implemented it with vector, but there was a small problem in dealing with the same keywords. (Originally, I was asked to write a multi-threaded hash table, but I am too silly, not...)
  3. Then I asked about the project, and I introduced what I was responsible for in the project.
  4. Asked about the network through the project, let me talk about the process of connecting the client and the server (TCP three-way handshake).
  5. Assuming that in the third handshake, the client does not return a confirmation message to the server, what will the server respond (timeout retransmission)?
  6. What mechanisms does TCP have to ensure that it is reliable (confirmation mechanism, checksum, sequence number, flow control, congestion control)
  7. Assuming that a certain sequence number in the packet data sent by the client to the server is lost, what will the server do (when the server does not receive the missing packet, it will not send an ack to the client, and the client has not received the ACK from the server Confirm the message, the lost packet will be resent)
  8. The difference between process and thread
  9. What is the principle of multiple threads sharing the resources of a process
  10. What are the ways of inter-process communication besides shared memory
  11. Do you have programming experience with multiple threads
  12. The difference between move construction and copy construction in C++ (I have never heard of move construction before...)
  13. Do you know smart pointers? Tell me about the difference between shared_ptr and other smart pointers

On the one hand, it took about 45 minutes. Most of them gave their own answers (some of them were vaguely answered), but there were also a few questions that they didn’t. Wait for the result (it is estimated to be GG)

Guess you like

Origin blog.csdn.net/Immaturecld/article/details/115300751