[Dachang Interview] ByteDance, Jingdong and other big factories interview questions to share, I have already got the byte offer~ free study notes

Recently, many friends went to interviews with major Internet companies (Alibaba, JD-Meituan). After the interview, they would send me some interview questions. Some friends get the offer easily, but some come to ask me the answer.

Actually, I didn't really plan to write this article. The main reason is that my memory is not very good. Unlike some people with strong memory, after the interview, I can almost write down the conversation between myself and the interviewer. After I finished the interview, apart from memorizing some of the knowledge points I talked about, I basically forgot the specific content completely, so writing this article is actually very difficult.

However, there are too many people who have asked me recently. In order to avoid repeating the answer, save yourself some effort, and simply reply here. To be honest, I can only vaguely think of keywords such as high concurrency, JVM, distributed, and TCP/IP. The specific problems are really hardly remembered. And even if I remembered it and told you it, and you learned it, I think it is still very unlikely that you will be asked exactly the same question in the interview. Even if you are lucky enough to be asked, if you memorize it, it may not be a positive effect on your interview, because if the interviewer asks one more question, you may be exposed. Simply point it would not be better. Here are the interview questions for large Internet companies.

I have sorted out some of the interview questions, and those who need it can [ click here, the secret code CSDN ], get it by yourself~
Insert picture description here
Insert picture description here

Jingdong interview (failed):

One side:
1. Reasons for resignation;
2. Zookeeper usage and principles in the project;
3. Introduction to some components of Springcloud;
4. Distributed lock:
Redis implementation:
redis: Why use setnx, or what is the difference between set and setNx ;
SetNx: The system sets a value at 10:05 and gives an expiration time of 5 minutes. The redis cluster crashes just after the system is set, and the system restarts successfully at 10:11, then does the set value in redis still exist?
Points to consider:
1. Redis persistence: can it be persisted to the snapshot or binlog log just after setting;
2. Assuming that redis is persisted and the system restart time exceeds the expiration time set by redis, then whether the key will be Clean up;
zookeeper implementation method:
5. Multi-thread creation method:
1. Inherit the thread class;
2. Implement the runnable interface;
3. Implement the callable interface;
4. Create the thread pool and the logical relationship between each parameter;

6. The relationship between the number of server CPUs and the number of thread pools;
1. The number of server CPUs (n);
2. Is it an IO-intensive (2n thread) application or a computationally intensive (n+1 thread) application;
7. Mysql sql optimization
Optimization direction:
1. Sentences that use the index during the use of Mysql:
2. Index optimization:
3. The data of 100 million levels must be queried using like, how to optimize?
8. How to make a spike system;
1. MQ for current limiting: ensure that only 1000 people can access the system;
2. Use redis for caching;
3. Redis for persistence in mysql
9. What do you think of your own technology?

Two sides:
1. Is Mysql a cluster or a single node; what is the amount of data in the largest table? 3000w-4000w;
2. Does the MySQL master-slave configuration do it by the DBA or do it yourself? The principle of the mysql master-slave synchronization mechanism? What are the main modes of mysql master-slave replication?
3. Redis persistence methods: rdb, aof; which version of redis can be used for distributed use;
4. Nginx usage scenarios;
1. request forwarding;
2. load balancing;
5. What is Spark mainly used for?
6. Do you know the front end: Does JavaScript have the concept of closures?
7. Reason for leaving?

Byte beating (have taken the offer)

One side and two sides (one side and two sides are only 10 minutes apart, let’s put it together)
1. C++ polymorphism implementation mechanism

2. The difference between references and pointers

3. How to change the direction of the reference halfway

4. Can references achieve runtime polymorphism? How to achieve? for example

5. Where is the virtual pointer? Have you practiced and explored yourself?

6. What is the general size of the stack? What is it related to?

7. When did the four waves degenerate to three times? Have you caught the bag? tool? Why capture the packet?

8. What is going on with virtual memory?

9. The underlying implementation of select poll epoll? Which is better? Why good?

10. Does the red-black tree understand? Why not use red-black trees for indexing? What are the advantages of B+ trees?

11. What is the phantom reading? How to ensure consistency?

12. What do you think about cache consistency? How to avoid dirty data?

13. What is Redis cache avalanche and cache penetration?

14. Redis 6 data elimination mechanisms? The process of AOF rewriting?

15. Redis underlying network model? What are the models under Linux and Windows

16. Fragments inside and outside the OS? the difference? How to recycle?

Code question:

1. Two ordered linked lists were merged. I wrote a version that opened up auxiliary space on the stack. The interviewer gave a thumbs up...

2. Exchange of linked list elements, exchange of the first and second positions, exchange of the third and fourth positions,,,, emphasizes the need to consider the number of odd and even elements in the linked list. For example, 1->2->3->4->5, output 2->1->4->3->5.

Later, I asked me to encapsulate the exchange function and the linked list initialization function. For example, if the main function enters an odd number 9, the linked list is automatically generated 1->2->3->4->5->6->7->8->9, and then Call the conversion function to generate 2->1->4->3->6->5->8->7->9

3. The number of islands.

Three sides:
1. Introduce yourself

2. Introduction to the project

3. Is the project a mature demo? How is the test done? Is there any improvement?

4. Introduction to personal advantages and disadvantages

5. Intelligence question: Tencent horse racing problem: 25 horses, 5 tracks, no counter, find out the fastest Top3, how many times is the minimum required

6. Go down the stairs, take two steps or one step, and ask how many options there are in total. It's almost like a frog jumping up a staircase.

7. How to judge whether the linked list has a ring? How to find out? How to do the shortest time complexity?

8. Where do you intend to work?

9, rhetorical question

Four
1 Introduce yourself

2. Introduce the internship experience, what are the gains? In the following life and study, did that period of harvest help you?

3. School experience? Seeing you have had an IT competition, what is the situation?

4. Did you encounter any problems during the team competition? Is the communication harmonious? How to deal with it

5. Are there any activities that have nothing to do with IT?

6. Intent city? I want to hear real thoughts...

7, rhetorical question

Broken thoughts

Some people may ask, have you read all these books? Is this too much? In fact, it’s a lot to watch, learn slowly and watch slowly, and you will gain something slowly. If you are not a good school like me, not a key school or a computer major, then please fly first.

At last:

The above interview experience is just a part of it. There are quite a lot of interview notes, some frequently asked questions about interviews with big factories, and some relatively high-download e-books on the Internet. You can take a part of it for everyone to see. Friends can also [ click here, secret code CSDN ] to collect it by yourself~~

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47345084/article/details/112022683