With 5 years of work experience, I gave up ease, an ultimate test from Tencent's devil interview!

Preface

Thanks to netizens for sharing this interview experience with Dachang

This opportunity to interview Tencent was obtained by casting a resume. The Tencent interviewer this time is generally more strict and likes to delve into some details. For me who don't usually like to delve into details, answering these is really a big test.
Insert picture description here

Being in peace with the present can easily make people lose their morale

Technical Interview

One side is to communicate directly by phone

  • go scheduling
  • Can go struct compare
  • go defer(for defer)
  • What can select be used for
  • The purpose of the context package
  • How does the client implement a long connection
  • How does the main coroutine wait for the other coroutines to finish before operating
  • slice, len, cap, sharing, expansion
  • How to read the map sequentially
  • Implement set
  • Implement message queue (multiple producers, multiple consumers)
  • Sort large files
  • Basic sorting, which ones are stable
  • http get跟head
  • http 401,403
  • http keep-alive
  • Can http connect to multiple requests at a time without waiting for the backend to return
  • The difference between tcp and udp, udp advantages, applicable scenarios
  • The role of time-wait
  • How to index the database
  • Orphan process
  • How to avoid deadlock conditions
  • linux commands, view port usage, cpu load, memory usage, how to send signals to a process
  • git file version, order of use, merge and rebase

Technical two-sided project related

Through the Tencent meeting, two of Tencent’s bosses interviewed together

  • The process of project implementation crawler
  • How does the crawler authenticate?
  • How to implement a distributed crawler
  • E-commerce system pictures will cause too high bandwidth, how to solve
  • micro service discovery
  • What are the implementation methods of mysql bottom layer
  • Channel bottom layer implementation
  • Difference between java nio and go
  • How is the underlying read-write lock implemented?
  • How to implement horizontal deployment of go-micro microservice architecture and how to implement the code
  • How to use micro
  • How to do service discovery
  • Why use B+ tree for mysql index?
  • mysql statement performance evaluation?
  • What are the mechanisms of service discovery
  • raft algorithm is the kind of consensus algorithm
  • What are the characteristics of raft
  • When the go service is deployed online and a memory leak is found, what should I do?
  • There are some very low-level problems

Logic problem

  • Rotate the array to find the value problem, such as increment the array [1,2,3,4,5,6] after rotating to get [4,5,6,1,2,3], enter a number, find out the number in the array position.
    Answer: I was too nervous at the time. I was entangled with this question, but my thinking was unreasonable. Later, it was quite simple to think about it in the car that came back. I only blamed myself for turning my mind too slowly under high pressure for a short time.
  • Converting a string to an integer
    A: After talking about the idea, read the characters in a loop, and return -1 if it is not 0-9, then join StringBuilder, the interviewer has no objection, and then I start to write code. The final method is: return Integer.parseInt(sb.toString()); The interviewer said that this is not acceptable (referring to parseInt), and then I asked whether it is okay to multiply the processed characters by the exponent of 10 in turn, the interviewer asked Can you not use this. Then I won't. . This question ends here. .
  • What is the most efficient method you can think of for a two-dimensional array to set all 0 or all add 1?
    Answer: Start with three aspects: reading, writing, and modification. .
  • I asked which aspect I’m good at (I also want to tap my strengths), but I don’t think there is anything I can tell. Recently, I have seen a lot of data structures. So I said this and asked a question about building a pile.
    Answer: I have only used the heap before when sorting the heap, and then according to that algorithm, it seems that the top element of the heap can only be guaranteed to be the largest (or smallest), and there is no guarantee that every node is a heap. . . I deeply feel that I am not good at learning. .

Insert picture description here

to sum up

Tencent attaches great importance to the basic part, and the overall answer is not bad. The
project part Tencent also attaches great importance to it. I heard from the phone that there is a framework for interviewing me... I
found many of my problems through the interview, so I still have to summarize it.

In view of the fact that many people have been interviewing recently, I have also compiled a lot of interview topic materials here, as well as experience from other major companies. Hope it helps everyone.

Latest finishing interview questions

Friends in need can add group 1149778920 secret code: qf

Insert picture description here

Real interview experience

Insert picture description here

The latest compilation of interview documents

Insert picture description here
The above is the whole content of this article, I hope it will be helpful to everyone's study, and I hope you can support it. One-click three consecutive!
Insert picture description here

Guess you like

Origin blog.csdn.net/S11035762/article/details/109241212