Tencent PCG mobile terminal interview initial test

On Thursday night, Tencent’s technical interviewer and HR came to the school to give a lecture to recruit interns. They originally wanted to apply for back-end positions, but due to the large number of people and the relatively small number of people on the mobile side, HR said that the probability was higher. So, I switched to mobile. To be honest, this interview is my first interview with Tencent. The time notice is that the interview will be in the afternoon. I searched the interview experience on the Internet and prepared for the evening and morning. Although it is not particularly good, it feels better than the last interview. It's a big improvement, so I also record the content of this interview and leave it to those who need it.

HR informed that the interview will start at 1:00 pm, and you need to arrive 15 minutes in advance to sign in. However, due to over-reviewing the knowledge and a delay in eating, you will arrive at 12:55, so you need a long memory here, and you must be on time.

Walking into the corridor is different from the envisaged noisy interview situation. Only HR is calling me, but I just arrived at the location. There is no queue, just walk into the interview classroom to participate in the interview.

Note here that you must repeatedly ask whether you need to bring a computer when you participate in an interview for a technical position in the future, otherwise it will be inconvenient and may leave a bad influence on the interviewer.

This interview was a one-on-one interview sitting directly next to the interviewer. After I handed in my resume, the interviewer began to read the resume. Among them, since the interviewer screened the resume yesterday, I did not need to introduce myself. And asked me questions about my resume:

1. Since I am familiar with Matlab and completed the production of the spectrum analyzer, the interviewer asked me to explain FFT. I was shocked at the time, because none of the other interviewers had asked me any questions about this aspect before, and I wrote it just to make up the content, and that part was the knowledge of the junior year, so I followed the knowledge in my memory. The content said that it is probably to use the butterfly algorithm to calculate the corresponding coefficients. Due to nervousness, some content may be wrong.

2. Then, since I wrote about the TensorFlow and PyTorch frameworks, let me explain the difference between the two frameworks. Here, you must remember that what you write in your resume must not leave a hole for yourself.

3. Seeing that I wrote a linux development experience with Ubuntu, I asked me what the meaning and difference between process and thread are. This part is because I have not studied the operating system, so I purely rely on the memory of the interview questions on the Internet yesterday. answered. This isn't a very good answer either. 

4. Seeing that I have done MFC and Qt development, I asked me about the difference between the two softwares. I said that Qt has more functions and can use many libraries, and the interface is better. Then maybe the interviewer felt that I didn't answer the point, so the guide said, what about cross-platform. So I said that Ubuntu has cross-platform development, and he continued to ask if MFC has cross-platform? I said I haven't tried it. I used it under Windows before, so it shouldn't be there.

5. I saw that I was familiar with C/C++ on my resume, so I asked me what is the virtual table in C++. Fortunately, I stayed up late yesterday to watch Hou Jieda’s video and reviewed it again. So according to Hou Da’s PPT, he explained while drawing a picture, saying that mainly in the inheritance, the virtual function will have a virtual table, and then the virtual pointer will point to the corresponding virtual function location. Then he grabbed my pen and had a discussion with me. (actually he was explaining...)

 6. Then maybe he doesn’t want to ask me any more questions, or maybe I let him down... Seeing that there is plenty of time, he wants me to write a code topic. If I am familiar with the language C++, choose the language The topic is still an algorithm.

I subconsciously thought about choosing a language topic, so he asked such a question: It probably means that I use a class to implement string. It scared me all of a sudden, and I immediately said, if you change the algorithm topic for me, I can only use strings and can't write, and cover my face manually! !

So, I thought he would come up with a question about quicksort or other sorting algorithms, but it turned out to be a math question similar to logical thinking, and asked me to write the code. The topic was told to me by the interviewer with gestures and explanations. Let me sum it up: just input a set of randomly sorted binary numbers of 01, such as 10101, 00001, 11010, etc., and ask how many binary numbers are required to obtain all zeros from the equivalent digits. Can the operation of flipping from 0 to 1 and consecutive numbers that can only be counted from right to left together get the above binary number?

For example, changing from 11010 to 00000 requires 00000->11111 ->11000 ->11011 ->11010, a total of four steps. Since I had no experience with this kind of algorithm problem for the first time, and the interview was a little nervous, I kept trying by myself, wrote a one-page paper derivation, and looked for the law. In the first 20 minutes, due to reasons such as the interviewer sitting next to me or being nervous, I had no idea, and several guesses were wrong. Maybe the interviewer got tired of watching me hhh, walked to the back to play with his mobile phone silently, and said to give me another ten minutes, and after he sat down for three minutes, I got the answer. I believe that many people have seen the answer to this question.

My solution is to use "10" as the operator, similar to the filter method in image processing, to search in the array, when a set of 10 numbers is found, the counter is added by one. Finally, multiply the value of the counter by 2, which means that 10 is two reversals, and then check whether the last digit is 1 or 0. If it is 1, multiply the value of the counter by 2 and add 1, and if it is 0, it will not change. (I didn't think about this last operation clearly at first. After the interviewer raised a question, I thought about it for a few seconds and gave a plan.) After I proposed it, the interviewer smiled a little, but he was still reluctant. , continue to ask me, why not use "01", in fact, I have also thought about this question, when the brain subconsciously considered the operator of 01 to be wrong, and did not verify it. However, what I am most satisfied with this interview is that my brain reacts very quickly, and I give the answer at once. I gave an example of 00001. If 01 is combined, then it only needs to be flipped once, and in this algorithm is Wrong thought it was twice.

After I explained, the interviewer smiled knowingly, looked at his watch and said, you write the program on my computer, and I will call the next one for an interview.

However, I may have been busy completing my thesis for more than half a month, and I didn't write much code, which caused some problems in my grammar, such as how to use arrays to store numbers, and how to declare an array. But fortunately, I did not make a mistake in writing the core algorithm module later.

When I was writing the code, the interviewer was interviewing a student who majored in hardware control, maybe a graduate student, and asked some questions about C++, but it seemed that the student was not very good at C++, so I finally wanted him to write a quick As a result, he couldn’t write the sorting algorithm, so I shook my head and said that the teacher wants me to write the quick sort, and I’m ready. The interviewer and another classmate both laughed. The interviewer said, you didn't come up with the algorithm, you just need to realize it. Write quickly, you have a time limit. As a result, after his interview, I still didn't think about how to solve the grammatical problems of declaring arrays. But I still had some brief exchanges with the interviewer, and I said, if you ask me to quickly queue up, I am already ready. As a result, the interviewer said with a smile that he is a dual-control major student, and the software is not strong, so he just asked the quick queue, which can be easier, but he still didn't write it out.

In general, no matter how this interview is, I think I have improved a lot compared to the previous SenseTime interview.

The next step is to do more algorithmic questions to increase the feel. Hope to have the opportunity to write the next part, two sides!

 

Guess you like

Origin blog.csdn.net/loveSIYU/article/details/117122508