amtoaer

晓风残月

叹息似的渺茫,你仍要保存着那真!
github
x
telegram
steam
nintendo switch
email

Tencent 2021 Backend Development Summer Internship Interview Record

Interview Process#

Tencent's interview consists of three parts: the initial interview, the second interview, and the HR interview. The first two rounds are technical interviews, while the last round mainly investigates the candidate's personal philosophy, learning status, family situation, and other related content.

After passing all three interviews, candidates will receive a cloud certificate link from Tencent's HR assistant within a few days, which mainly involves uploading ID and facial information for verification. Then, candidates just need to patiently wait for the offer and intention letter.

Personal Situation#

The blogger is a junior student majoring in Computer Science and Technology at Northeastern University, familiar with languages such as Go, C++, Java, and JavaScript (mainly using Golang). The GPA is below average, and the projects listed on the resume include a Java course design project "Java Drawing Board," a web programming project "Java Forum System," and a major innovation project "Blockchain-based Electronic Medical Record System." The applied position is backend development, with no specific department preference, based in Beijing and open to adjustments.

Timeline#

DateEvent
3.17Submitted resume
3.18Scheduled interview
3.22First interview with Tencent in Shenzhen
3.30Second interview with Tencent in Shenzhen
4.1Failed the second interview with Tencent in Shenzhen
4.7Tencent Beijing reached out for an interview
4.8First interview with Tencent in Beijing
4.12Second interview with Tencent in Beijing
4.14HR interview with Tencent in Beijing
4.15Received the offer (results were quick due to being the last day of the early batch)

Next is the detailed interview process.

First Initial Interview (1 hour 10 minutes)#

Self-Introduction#

Programming Question#

The opening question was a programming problem: find the lowest common ancestor of two nodes in a binary tree.

I had done this problem before, but I didn't remember it well, and I got stuck for a long time, making many small mistakes along the way, which was quite painful.

Interviewer:

  1. You need to learn the naming conventions of Golang. (However, I named my function "test" because I didn't know how to spell "lowest common ancestor" in English XD)
  2. Omit the unnecessary else if and else after the return in the function (this was indeed due to my oversight).

Non-Programming Questions#

Next were all non-programming questions, recorded in the following categories.

Strategy Question#

There are 64 horses and 8 tracks. What is the minimum number of races needed to determine the fastest 4 horses? (Timing is not allowed, and the horses' strengths are fixed)

Personally, I felt stuck on this question for at least twenty minutes, but I couldn't come up with an answer.
I initially considered binary methods because I had seen a similar poisoning mouse problem before. However, the interviewer told me this question had nothing to do with binary, which left my thoughts in chaos...
The interviewer saw that I couldn't solve this question for a while, so he set it aside for the subsequent process. After the subsequent process ended, he returned to ask me about my thoughts and the answer to this question, but I still couldn't solve it. (The interviewer was trying to guide me in the right direction, but unfortunately, I was too disappointing, sob sob sob)
Online solution: https://blog.csdn.net/u013829973/article/details/80787928

  1. How are slices implemented in Golang? Since slices are backed by fixed-length arrays, how are elements inserted into slices? What considerations are there when passing slices as function parameters?

My personal answer: A Golang slice is a structure consisting of a pointer to the underlying array, capacity, and current length.
When inserting elements into a slice, if the underlying array has enough capacity, it simply increments the length by 1 and adds the new element to the slice. If the underlying array does not have enough capacity, it reallocates the underlying array to double the original capacity, copies the elements, and makes the slice's pointer point to the new array.
When passing slices as function parameters, if only modifying the elements within the slice, it can use value passing since the pointer to the underlying array can be obtained during the value copy of the structure.
When needing to insert elements into the slice (i.e., append), since it may expand and cause the underlying array pointer to point to a new location, the original slice's pointer needs to be passed.

  1. What is a map in Golang? How are hash collisions handled?

My personal answer: A Golang map is a hash table.
When a hash collision occurs, Golang writes the value to be stored into the linked list corresponding to the key (i.e., using the common chaining method to resolve hash collisions).

  1. Golang's structs implicitly implement interfaces. If a struct is assigned to an interface it implements, how does Golang internally call the methods of the struct through that interface?

I didn't know much about this question at first. I just said that structs need to implement all methods in the interface to implement the interface. The interviewer emphasized "internal implementation," meaning that when calling the interface method, Golang should have a mechanism to find the corresponding method in the struct assigned to the interface.
I guessed it might involve reflection (reflect), but he continued to probe deeper, and I could only admit that I didn't know much.

Personal Questions#

I saw that you wrote some web development experience on your resume. Since you have web development experience, why did you apply for backend development? (He mentioned that Tencent also has positions for front-end development and full-stack development.)

My personal answer: I feel that my front-end skills are still quite limited; I can write but not proficiently. Most of my front-end work is in Vue, and I don't have a deep understanding of basic JavaScript/TypeScript, so I feel I lack the ability to qualify for such positions.
Looking back now, maybe the interviewer thinks I also lack the ability to qualify for backend development? (sad)

Basic Knowledge#

  1. Since you are familiar with web development, can you explain the HTTP protocol?

I felt a bit confused while answering. I mentioned that an HTTP request has a request header and a request body, and I introduced common request methods (Get/Post/Head) and status codes.

  1. I saw you mentioned using RSA encryption in your major innovation project. Can you explain how HTTPS encryption is implemented? In the first step, the client needs to send the server the encryption algorithms it supports. If the client does not support any encryption algorithms, what is the handling method for HTTPS?

I explained the symmetric and asymmetric encryption processes, but I was not clear on the situation where the client does not support any encryption algorithms, so I honestly admitted that I didn't know. (Later, I checked and found that it should result in a cipher suite mismatch error?)

Reverse Questions#

Finally, it was my turn to ask questions. I mainly asked two questions:

  1. When applying for the backend development position, the recruitment website only listed C/C++/Java as the required languages. If I pass the interview, will I need to consider switching languages?

The interviewer replied: Tencent has many positions for various languages; they are in the Golang department, and it was a mistake in the recruitment website's wording.

  1. I initially chose June 1 as my start date for the internship, but later found out that one of my courses would require some extra time. Can the start date for the internship be adjusted?

The interviewer replied: The start date for the internship is not very important and should be negotiable; what matters is how long the internship lasts.

Summary#

Overall, I am quite satisfied with this interview, not because I performed well (I actually performed poorly), but because the interview process taught me a lot.

On one hand, this was my first interview ever, and it was with a big company like Tencent, so it was inevitable to feel nervous. At the beginning of the interview, I even felt like I had forgotten everything I had learned (not doing well on the first question contributed to this). Fortunately, I encountered a kind interviewer who, after seeing me get stuck, did not pressure me but tried to guide me to think in the right direction, which eased my nervousness and allowed me to stabilize and perform at my normal level in the subsequent process.

On the other hand, through this interview, I also saw the gap between myself and big companies, and since I still have time, I can prepare specifically. From my current feeling, Tencent's interviews lean more towards the fundamentals, which means that if I have the opportunity to participate in the second interview, I need to understand Golang's underlying data structures, escape analysis, scheduler, garbage collection, concurrency model, and other content in more detail.

Finally, the interviewer's attitude left a deep impression on me. Originally, the interviewer had a family emergency and needed to adjust the interview time. I mentioned that I was free recently and could extend the time to accommodate him, but to avoid wasting my time, he still scheduled it for the next evening. After the interview ended the next day, as I was about to say my thanks, the interviewer first said to me, "This interview lasted over an hour; you worked hard," which really touched me.

Result#

The next day, I checked and found that I had entered the second interview stage.

First Second Interview (50 minutes)#

Self-Introduction#

Project#

  1. Design, architecture, innovation points, and improvement points of the major innovation project.

I tried to answer this, but perhaps because the project was too simple and my explanations were too vague, I could clearly feel the interviewer was not satisfied.

  1. Database design, difficulties, and authentication methods of the Java forum system.

I roughly mentioned that there is a user table, a post table, and a post content table. There weren't really any difficulties, so I didn't mention them. The authentication method used JWT.

  1. Explain JWT in detail. Besides JWT, what other authentication methods are there? Compare the advantages and disadvantages of JWT authentication and Session-Cookie authentication. Can Session-Cookie be used in a front-end and back-end separation?

Because I hadn't reviewed in a long time, I only mentioned that JWT can store some data (I only remembered after the interview that JWT's Token contains Header, Payload, and Signature).
Besides JWT, there is also the Session-Cookie method.
In comparison, since JWT is stateless on the server side, it is more suitable for server clusters and other distributed scenarios, while Session-Cookie is the traditional method, with the Session-id stored in the cookie.
At that time, I indeed thought that front-end and back-end separation could not use Session-Cookie, so I answered that way.

Others#

  1. Is your blog original? Can you introduce the different methods used in "Finding the Same String"?

Yes, but that article was from half a year ago, so I couldn't remember much.

  1. What are the differences between processes, threads, and coroutines? Have you used multithreaded programming?

The first question was standard; a normal answer would suffice.
For the second question, I answered that I had used it but not extensively.

  1. Why do you want to learn Go?

I personally enjoy learning about new things. I have been exposed to Rust and Go, and since Golang is simple enough, I did some learning. Later, I checked some job postings and found that big companies generally have Golang departments, and the development prospects of this language are quite broad, which led me to focus on Golang.

  1. School's internship arrangements. Questions about the work location (I prefer Beijing, but they are in Shenzhen).

I introduced the start time for the internship and expressed that the work location was not a concern.

Reverse Questions#

  1. Which department is interviewing me?

Tencent's information flow department.

  1. Do you have any suggestions for me?

Strengthen practice and understand the basic principles of backend development.

Result#

Two and a half days later, the official website turned gray, indicating that the process had ended (I failed).


A week later, I received a call from Beijing. The caller introduced themselves as from Tencent Beijing and asked if I still had an interest in the internship. After confirming my interest, we scheduled a time for the initial interview.

Second Initial Interview (50 minutes)#

Since I had already passed the initial interview once, this time there were no basic knowledge questions; all were related to Go language.

Self-Introduction#

Oral Questions#

  1. What version of Go are you using? Can you talk about the changes in Go versions?

Since I use Arch Linux, which frequently rolls out updates, I have always been using the latest version of Go.

I only mentioned two version changes: Golang 1.11 introduced go mod, and 1.16 included static resource packaging.

  1. Have you learned about Goroutines? Can you explain the scheduling method?

I have learned about it and introduced the GMP scheduling model.

However, when the interviewer asked if G would starve when M is blocked, I answered yes. (I later realized that at this point, M and P would unbind, and another M would execute that P.)

  1. What types are in the Go sync package?

I answered sync.Map (concurrent-safe map), sync.Mutex (mutex), sync.RWMutex (read-write lock), sync.WaitGroup (counting semaphore).

  1. What is the difference between Mutex and RWMutex?

Mutex is a general lock that does not distinguish between scenarios, while RWMutex allows multiple reads but only single writes.

Programming Questions#

  1. Implement a model with m tasks and n workers.

This mainly tests the use of channels and routines.

  1. Implement a concurrent-safe map with Get/Set/Add methods.

This tests the use of RWMutex.

Reverse Questions#

  1. How did I perform in the interview?

Pretty well; it showed that I am quite proficient in Go, but I lack knowledge of some deeper topics.

I recommended a book to me: "Effective Go."

  1. What are the responsibilities of the department I am interviewing for?

It is the same as the last interview, also related to information flow.

Second Second Interview (24 minutes)#

Self-Introduction#

Language Questions#

  1. Did the school offer a Go language course, or did you self-study? Why did you want to self-study Go?

I answered that I self-studied, with the same reasons as in the first second interview.

  1. What are the differences between Go and C++? How about between Go and Java?

Go and C++ are both native languages. First, C++ can implement all the functionalities of Go, but Go has a higher level of encapsulation and is simpler to use.
Java, being a language that runs on a virtual machine, I believe cannot match Go in performance, but it has a long history with mature software libraries and project management tools, while Go is somewhat lacking in this regard.

Basic Knowledge#

  1. Can you explain the seven-layer model of computer networks, TCP/UDP, ICMP, IP, routers, and switches?

I hadn't reviewed computer networks in a long time and actually forgot about the network layer, and I also answered the router's level incorrectly at the end. (I shouldn't have done that.)

  1. Have you studied operating systems? What are the differences between processes and threads? What is the process ID range for a 32-bit Linux machine?

I am currently studying operating systems this semester. The difference between processes and threads is standard, but I didn't know the answer to the latter question.

  1. How would you query people aged 18 to 25 in SQL, and how would you sort them by age? How would you speed up the query, and what would the query method be if there were no index?

The first question was very simple.
For the second question, I mentioned establishing an index. If there is no index, the query method would be a full table scan.

Project#

Can you introduce your project? Talk about its design and difficulties?

Reverse Questions#

  1. How did I perform, and do you have any suggestions?

Language is just a tool; the most important thing is the fundamentals. I should strengthen my grasp of basic knowledge.

  1. Questions related to the internship duration.

The minimum requirement is three months, and the specific time can be discussed with HR.

Result#

After the interview, I thought I would fail. While complaining to a friend, I checked and found that I actually passed. (Thanks to the interviewer!)

HR Interview (23 minutes)#

Self-Introduction#

Others#

  1. The previous interviewer provided feedback that you are quite proficient in Go. Why did you want to learn Go?
  2. What is your ideal job?
  3. What is your family situation? What do your parents do? Do you have siblings?
  4. What is your GPA ranking, and why is your GPA not ideal? What are your future plans (further studies or employment)?
  5. What are your strengths compared to other students applying for further studies or exams?
  6. Introduce one of your projects, focusing on its purpose, functionality, and your responsibilities.
  7. How was the team formed for the major innovation project, and what did you learn from it?
  8. Do you have any direct relatives at Tencent? What is the duration of your internship?
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.