Tencent C++ background development internship experience (have got an offer)

Tencent C++ background development internship experience (have got an offer)

The process is tortuous, and the result is beautiful. The elder sister directly pushed her own department, TEG. After the interview, the replay is based on memory. It is not very detailed, but most of the problems are here. One side 3.2 Telephone interview 1h Self-introduction of project research, background, how to realize the deep copy and shallow copy destructors, why are the virtual three-way handshake exchanges (seq/ack+send window), what the send window does, explain the sliding window protocol The difference between signal and semaphore What is the IO protocol stack (do not understand, can you give me some explanation), the interviewer gave an example of opening a file, inputting it from the keyboard and saving it, what happened during this period of time. I replied that the keyboard is a peripheral device that generates an IO interrupt, the CPU reads it and puts it into the memory, and then puts it into the disk from the memory. The interviewer asked how to read the data from the memory to the disk. I talked about page replacement or something (the answer is not what I asked). I also talked about the L1, L2, L3 cache in the middle. When I was asked what was in it, I didn t know much about it. Some registers or something. 32-bit system, how big is the address space (2^32=4GB) How to convert the physical address space and virtual address space (some basic definitions are pulled, and finally I don t know how to convert, the answer should be MMU) What are the technologies for memory ( Open answer, exchange technology and virtual memory, focusing on virtual memory, page frame, page table, cache elimination strategy is generally LRU) Algorithm question: Use words as the smallest unit to reverse the string, first reverse the whole, then traverse, and encounter spaces When I flip the previous paragraph (word flip) Algorithmic question: Find duplicate data for 100,000 numbers. I answered the hash table, bitmap, bloom filter, sorting, and what else I want to ask. In order to express myself, I asked. About the consistency of the other party s products, I also asked if I used PAXOS and RAFT algorithms for reference. The other party told me a lot of knowledge about storage. I didn t ask about network concurrency and databases. Except for a few issues with the operating system, everything else The answer was quite good. It seems that I have to look at the details of the operating system. The last question and exchange were quite pleasant. The feedback from the senior sisters was good. Two sides 3. 6 Niuke.com 1h Personal introduction to the project and competition. I asked carefully about the working mode of epoll, how to select the advantages and disadvantages, disadvantages, and how to achieve memory overhead overloading (name translation) What kinds of virtual function pipelines are divided into, anonymous How to realize the pipeline (fork, copy the address space of the parent process, share the same pipe socket, so you can communicate anonymously) Shredded code: the (maximum) width of the binary tree. In the interview room of Niuke.com, after you finish writing, you need to call the main function to output, and the code can work. On the same day, the senior sister gave feedback that after two sides, three sides are big bosses. They are serious and may be very stressful. Be psychologically prepared (it turns out that psychological preparation is useless...) 3.sides (pressure side) 3.10 Tencent meeting 1h For the project, I didn t ask about the optimization method or the scheduler, so I asked why there was a deadlock. I replied that it is determined by the scheduling rules. Can you try to lock to solve the deadlock? I said no, because the vehicle is not allowed. Walk partly, if it can t reach the full speed, it will wait, so it may wait in a loop. Take an example of a square loop. After this example was given, the interviewer s doubts were dispelled. Fortunately, it was able to A deadlock scenario was constructed under tremendous pressure. Asked about the difficulties encountered in the SDN project. I said that it took a long time for the user to communicate with the controller. The interviewer thought that this is a very basic function. Any SDN controller should provide it, saying that I have a problem with the technology selection. I answered that I didn t expect to need this function at the beginning. This framework has been built, so I didn t think about other SDN controllers. This needs to be implemented manually by myself. Finally, the communication between the user and the controller realized by NAT technology conversion (this is a bit Decrease points, saying that I have a problem with my technical selection, and my tone is a bit blunt). Why is the accuracy of the delay detection module in the SDN project better (in the SDN environment, the switch does not have the ability to process the header, so it has to be handed over to the controller, so you have to implement the detection method yourself), how is the time obtained (I replied in Python time library, call time. time() can get the current time), ask what the accuracy of the return value of the time function is (I was a little panicked, and I forgot the specific accuracy here, I was stunned) Linux timing accuracy, how Moving forward (the crystal oscillator generates a tick, and the timer, such as the time wheel, should be regarded as the answer here) Inter-process communication, to send 10GB of data, how to do it, first talk about the pipe, then the socket, and then use the socket distance Speaking of the process: because the socket has a buffer, it can be segmented first, and then read while writing. Then I asked me which IPC method is the fastest, and I answered shared memory. The topic shifted to the realization of shared memory. I said mmap and asked if I actually wrote it. I said no, but I know some application scenarios. What are the applications of mmap (malloc allocates memory, and epoll registers events with the kernel, here is the answer) collection, each number has two, only one number has only one (I answer XOR, ask me if there are other, I talked about hash tables, and then elaborated on the specific implementation of the two methods and the complexity of time and space) Puzzles, two pills A and B, the appearance is exactly the same, and can not be distinguished by smell, Xiao Ming has two A and two B, but confuse them. Xiao Ming needs to take half a capsule and half capsule B each time. What should I do (cut into quarters, and the answer came out) Summary: The interviewer puts me under a lot of pressure and speaks quickly. The whole interview was in a very tense state. I almost wanted to give up when I was caught in the project, but I still insisted on finishing the interview. It can be said that this interview has greatly improved my pressure-bearing ability. After I asked the senior sister, there was no news yet. I thought it was cold, so I told me that night and I was very excited. However, the interview status was always retesting. I asked the senior sister to urge it, but there was still no response. Until 3.19, the wait-and-see status suddenly changed to the first test. I panicked and quickly asked the senior sister. The senior sister asked the HR and said there are two possibilities: either cold or cold. Changed the group. At that time, all thoughts were lost and very depressed. 3.20 The status changed to the re-examination again, I was dumbfounded, and the status at night changed directly to the HR interview. I was very happy. HR face 3.27 received the email of the HR interview invitation at 3 pm at noon, so I planned to take a nap, and suddenly received a call from Hangzhou in my sleep, Ali came from all directions! After finally finishing the interview, a minute after hanging up the phone, the Cantonese phone came. 3. Originally scheduled a telephone interview, but because the call was not clear, it was changed to a video call interview in the Tencent meeting. The following A is that I have more experience in watching your game. How do you watch the game? A: Because the students at school participated Actually, there are few opportunities for large-scale projects. Competitions are a good choice. You can exercise your programming skills, as well as your problem-solving and problem-analyzing skills. Why not do internships instead of competitions? A: Tencent has relatively high requirements, in order to play well. Basically, improve myself, so I chose to play the game, and did not systematically review the knowledge related to background development, so I continued to learn, participate in the competition, and improve myself. Talk about the Huawei competition A: What is the division of the Barabara competition? A: I'm the captain and main course. How did my teammate assist Barabala during the game? Are there any problems other than technical problems? A: Barabala (teamwork) Yes. It can be seen that this teamwork is an unforgettable memory for you. The biggest gain you have obtained in two or three years of scientific research projects A: thinking mode, discovering problems-analyzing problems-solving problems, Barabara (seems to agree with this thinking mode) ) When did you find that you have mastered this mode of thinking? A: Directly cited the example of the Huawei Software Elite Challenge, from analyzing the problem, to asking the problem, using optimization methods to solve the problem, and then to the technical problem, and then focusing on the problem , The final results are achieved, the sense of accomplishment is very strong, Barabala, you have no internship experience in a major Internet company, how to understand the Internet back-end position A: Although there is no internship, but there is a lot of understanding, through the previous rounds of technical aspects, I believe in my back-end Knowledge storage is also a pass. I also really want to join Tencent Internet Company. Internet companies mainly do products and services. For a large-scale company like Tencent, products must serve thousands of users. That is to provide better products and services. , It requires the division of labor and cooperation of technical personnel, front-end and back-end, etc. There are many back-end directions, such as databases and servers. I believe Tencent must use the best hardware resources, but even the best equipment must be handed over to people. In order to give full play to our advantages, the background is to do such a thing. What we have to do is to maximize the use of hardware resources, provide basic guarantees for products and services, etc., Barabara, you said very well, very host-like, I will be yours I brought it in. A: I used to be a host, so it s pretty good in terms of speaking. Internship time A: Barabara, no problem for three months. What s the problem? A: When will there be a result? Go to the official website to check the status after a few hours. Yes, if it has been completed, wait for the offer to be approved, which requires two or three Good day, there will be results about next week. A: Will I be in the same department as my interpolating elder sister (checked the computer and found that my interviewer is also in the same department) Maybe A: I think if I are familiar If my direct elder sister takes me, I will grow faster. Don t worry, we will arrange mentors. They are very nice, and I believe that your communication skills can definitely grow very fast. (At the end of the plan) Has any other company been interviewed recently? A: I voted for some resumes (because it was almost over, I didn t turn my mind at the time and forgot to say "I want to go to Tencent the most"!) Summary: I just finished facing Ali, not only had to tear up the code, I also asked a lot of things, because I said three points to end, so the interviewer spoke very quickly, I think I did not play very well. When listening to the young lady from Tencent HR, she occasionally lost her mind, and her thoughts have not completely emerged from some of the problems half an hour ago. Fortunately, Miss HR is very gentle and speaks softly. Soon I calmed down and started to play the level I should have. From the 3.2 side, to the 3.6 two sides, and then to the 3.10 three sides of Alexandria, I thought I was going to be cold under the director s serial gun, but the internally pushed senior sister said that I had passed, but the resume has not been updated, 3.19, my status changed to At the first test, I was frustrated. The elder sister asked HR and said that it was either cold or transfer, but it turned into a retest in the afternoon of 3.20. It felt like a turnaround and turned into an HR interview in the evening. I was excited. I waited and waited. 3.27 I received an interview invitation at noon, make a wish offer! 4.1 At 17 o'clock, I got a call when I was working out, Shenzhen, Guangdong, landline number, oc is coming, and I received the letter of employment two hours later, thank Tencent dad for taking me in. I received an interview invitation at noon, make a wish! 4.1 At 17 o'clock, I got a call when I was working out, Shenzhen, Guangdong, landline number, oc is coming, and I received the letter of employment two hours later, thank Tencent dad for taking me in. I received an interview invitation at noon, make a wish! 4.1 At 17 o'clock, I got a call when I was working out, Shenzhen, Guangdong, landline number, oc is coming, and I received the letter of employment two hours later, thank Tencent dad for taking me in.

Tencent Tencent Video (PCG) One side (3 hours 48 minutes): You read that right, three hours, I can t remember a lot, I asked too much, and my voice was dumb. The main reason is that the technology stack is not the same, too. Don t miss me 1, the code test three code questions, give 90 minutes, but I finished writing quickly, it is not allowed to use any library functions and built-in data structure (1) find the 100th largest number (2) character String copy function (3) Decimal digits are converted into 64 hexadecimal numbers, the hexadecimal characters include 0-9 AZ az and #@ asked about fast row, recursive and non-recursive realization 2, socket programming, principle 3, time wait is all What happens if it is set to 0? 4. How to disconnect the socket? tcp waved 5, how to compile java, specific details 6, linux asked a lot, I don t know it well, I can t remember, I ve been asking this for a long time. 7, talked about the project, and the specific places used, talked about Many, message queues, implementation mechanisms, how to ensure availability? Redis principle, zookeeper principle, clusters and so on, the question is too deep, collapsed, mysql also asked, such as sub-database sub-table, how to solve data duplication 8. How to divide the memory process

9. The browser captures the packet and explains the meaning of each part in the head. 10. What is the difference between get post? 11. Why do you use cookies? 12. Visit Baidu and the other party uses load balancing. The process that goes through. 13. Communication between processes. 14. I did not remember when I asked a few questions. It should be in the compilation principle. I haven t learned the principles of compilation. I said yes. 15. Is the data packet sent out by http parsed in the network card or in the memory? 16. The data structure of java. 17, the bottom layer of the zset of redis. , But there are duplicates, the number is about 2.5 billion, and the rest are duplicates. How to find out the number of duplicates or find out which ones are duplicates can only be operated on one machine and must be in memory. 19. Process The relationship with the thread (I guess it depends on my Linux is too good, or use java is nothing to ask) 20, there are a few really can't remember. 21. The technology stack is c++ and go. Ask whether it can be accepted or not, and specify the answer. 22. How can polymorphism in java be realized? Why can it be polymorphism? What is the difference when compiling? Why do you need to rewrite the method? 23. MySQL engine difference 24. MySQL index b+ tree red-black tree 25, red-black tree characteristics 26, mysql transaction 27, mysql reproducible mvcc If multiple threads modify a row at the same time, the result will be the last commit what? 28. The mysql data is over 100 million, how to find and optimize quickly? I m talking about indexes and sub-databases and sub-tables. There are questions about sub-databases and sub-tables. I m kneeling when I ask. 29. Some Linux drivers can t remember and try their best.

I thought it was cold and it turned into a retest within a few hours. I was doing the NetEase evaluation at nine o'clock in the evening, and I called again before finishing it. It was the second side of pcg.

Two sides (46 minutes) 1. The project, I have been speaking in the vernacular for a long time. When Ali HR met with me, sister hr gave me advice on how to answer the project. I organized it carefully. 2. Asked how the technology of the project is disaster-tolerant. There is a vernacular 3. User mode and kernel mode, what problems will occur when switching 4. epoll 5. How to communicate between processes 6. What is the process of c++ compilation? 7. HashMap in java 8, b+ tree red-black tree implementation and complexity 9. It seems that there are still two problems, I can't remember

Finally, welcome to pay attention to my official account: Internet School Recruitment. Every day a high-quality Internet school recruitment face to share! Summarize regularly every month! There is also an e-book benefit gift!