Tencent game client development interview

one side

I came up to ask a relatively simple programming question. There are 100 lights, numbered from 1 to 100. The state of the lights is on at first, and then according to multiples of 1, multiples of 2, and multiples of 3. . . Flip all the way up to multiples of 100 and ask you which lights were the last to go out. At that time, I should have thought about it carefully before writing the code. The idea was a little troublesome at the beginning. In fact, it is enough to go through it like a prime number sieve, probably nlogn.
Then I asked the difference between struct and class (the difference between public and private by default), but the interviewer was not very satisfied. Maybe there should be a deeper explanation. Forgive me, I really don't know much at the bottom.
I asked about the difference between thread and process, (about what I saw before), the role of const (just remember to define constants, define constant pointers, and constant member functions), the difference between pointers and references, function parameter transfer, and more C++ attitude. Then also asked a k-th largest question.
I hung up later. Generally speaking, I have a certain knowledge, but it is very simple and rough, and it is not deep enough. In fact, when I communicate, I can tell everything I know, but the first interview is also relatively nervous, and in some places Can't remember. The basic knowledge must be firmly grasped. In addition, the advice given by the interviewer is to choose a good direction now, and then devote yourself to learning and understand more deeply. It is far from enough to rely on textbooks and knowledge in class.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324482643&siteId=291194637
Recommended