Mogujie laid off staff and closed for 90 days, gnawed these technical notes, and was fortunate to pass the interview of Ali P7 Java post

Preface

Let me talk about my personal situation first. The 18th freshman entered Mogujie through school recruitment and stayed there for almost 2 years. Unfortunately, I encountered a major layoff in April this year due to the epidemic. Is also one of them. Fortunately, I had a hunch and made preparations in advance. I had always wanted to go to ByteDance before. I had been preparing for it years ago. This protracted battle was a long time and finally won in 3 months. On the day when I stepped into Byte Beat and went through the entry formalities, as a man, I really shed tears. I would like to share a wave of my real experiences and encourage each other.

Small tip:

In fact, when a company wants to lay off employees, there are usually some early signs: business development encounters large bottlenecks, and it is difficult to break through, frequent adjustments to strategic goals, senior executives start to leave one after another, start to strictly check attendance, and start some colleagues to dismiss. Of companies are also beginning to experience these symptoms, don't think about it, it's time to start preparing.

The following content involves 4 major links:

  • Link 1: Make a plan and prepare
  • Session 2: Implement the plan and prepare for actual combat
  • Session 3: Develop and deliver resume
  • Session 4: Bytedance interview experience, real record restoration

In the four links, the content contains a lot of documentation. Due to the limited length of the article, it is all organized in the documentation, including Java learning materials, study notes, algorithm collections, interview question collections, mind maps (Xmind), etc. These materials are needed Of friends get the download method by themselves~

 

é¿éå · ´å · ´20亿ç¾åæ¶è´ç½æèæ

Link 1: Make a plan and prepare

1. Sort out the knowledge system

The status quo of most programmers is very strange now. The knowledge they have is relatively fragmented, or they only know what a certain knowledge point is. In fact, this is not a system for the technical content that they have mastered. Therefore, the first step in making a plan is to sort out your own knowledge system. Regarding combing the knowledge system, the following 2 points should be achieved:

  • Do you know why, where, how of this knowledge point
  • Can you explain these concepts and knowledge in a simple and easy-to-understand way to someone who does not understand at all?

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

System Knowledge Graph

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

Docker mind map (xmid)

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

Java concurrency system diagram (xmind)

2. Prepare the algorithm

  • How to learn algorithms?
  • What are the algorithms that programmers must master?
  • Is Leetcode stable?

Regarding the algorithm part, there are actually a lot of details to be prepared, so I also spent a lot of thought to organize a book on the algorithm. This information is my understanding of the algorithm and my learning method. In addition to Leetcode, the interview The core algorithm questions that officials like to ask are also deeply analyzed one by one.

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

3. Collect and organize interview questions

In addition to the algorithm part, if you want to be well-informed in the actual interview, it is also necessary to take a look at some of the interview questions or knowledge points frequently asked by big companies. I deliberately collected and sorted out the interview questions (technical part) of the first-line Internet companies in the past 3 years . I will find that these interview questions are actually similar to each other, but the content and technology of your examination have different purposes. An analysis of this part , I also wrote in the answer (see the document for details).

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

Session 2: Implement the plan and prepare for actual combat

The preliminary preparations need to be taken step by step, but apart from the above, it is definitely not enough. In addition to technical-related questions, the interviewer must ask the project-related content. How should the project-related content be prepared? In addition to the accumulation of our own actual combat experience, we can actually read some actual combat experience and notes written by technical experts. Such as: Redis notes, SpringBoot technical notes, etc.

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

Redis notes

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

SpringBoot technical notes

To download more practical books, follow me + private password "actual combat":

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

Session 3: Develop and deliver resume

Resume is a very important part for programmers. A good resume can often help us knock on the door of major Internet companies. I won’t go into details about the resume. You can refer to the "Programmer Finding a Job Guide", and I can provide 18 excellent resume templates.

After downloading, make your own resume according to the template, and then you can deliver it smoothly! You must refer to the matching value when submitting your resume. It is recommended to find an acquaintance to push it.

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

Resume template

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

Session 4: Alibaba's interview experience, real record restoration

Ali side:

The first aspect I think should be the basic aspect. The focus is on the breadth of my technology and the mastery of some technologies. On the other hand, the little brother did not delve into a specific point. The interview time is about 1 hour.

  • Self introduction
  • How do you plan to deliver back-end positions without considering work that fits your research direction?
  • Have you ever understood OAuth2.0? Tell me about your understanding of OAuth2.0
  • During the development of Mushroom Blog, do you know or learn about other open source frameworks?
  • What is the process of publishing mushroom blog posts? Is it a multi-person blog system?
  • Do you know some other blog frameworks? Such as hexo
  • What is the difference between hexo and mushroom blog? What functions and advantages does Mushroom Blog have?
  • See your mushroom blog uses RabbitMQ, then talk about why RabbitMQ was introduced?
  • What is the difference between RabbitMQ and other message queues, such as ActiveMQ, RocketMQ, and Kafka?
  • Why is Redis used in your blog project?
  • I see you use JustAuth this login authorization? Talk about the problem of account leakage?
  • Let's talk about Redis. Will it have the problem of thread switching?
  • Talk about Redis single thread model and IO multiplexing
  • Redis big key problem, if there is a value of 2M in size, will there be any problems? What is the maximum value size supported?
  • Talk about Redis Cluster Redis Cluster, and the principle of master-slave replication?
  • Talk about the sentinel in Redis, that is, Redis Sentinel
  • Let’s talk about Linux. Do you know how Linux can check the current load situation?
  • Do you know any other Linux commands?
  • What are the differences between cat, tail, vi, and vim commands?
  • If you need to open or view large files under Linux, what would you do?
  • Let’s talk about Http Code. Do you know what the 3XX status code corresponds to?
  • Talk about some other status codes you know, 4XX and 5XX?
  • Algorithmic questions:

(1)# Given some arrays, such as the following format, they all represent an interval, and then you need to merge the intervals

[1,2],[2,4],[3,7],[8,11]

# As shown above, [1,2] and [2,4] = [1,4]

# Then [1,4] and [3,7] = [1,7]

# Finally [1,7] and [8,11] cannot be combined, so the final result should return [1,7],[8,11]

(2)# Given an array, such as [1,1,2,2,2,3,3,3,3], the array inside is not necessarily continuous and orderly, suppose I enter 2, this 2 means The two most frequent

# Then you need to return me 2, 3

Ali two sides:

  • Self introduction
  • Is the blog open source, what open source protocol is used, and how many blog users are there?
  • Seeing that Solr and ElasticSearch are used in your blog, talk about their principles and inverted indexes?
  • Have you learned about some Chinese word segmenters used in Solr or ES?
  • Talking about those technology stacks, which ones are you more familiar with, mysql and redis?
  • Talk about the underlying index structure of MySQL, B+Tree in InnoDB?
  • The difference between B Tree and B+ Tree
  • Talk about the development process of MySQL index? Is it B+Tree? There is never an index, hash, binary sort tree, AVL tree, B tree, B+ tree chat.
  • Talk about transactions in MySQL, what are transactions?
  • What are the transaction levels in MySQL, and what problems will occur with different transaction levels?
  • Talk about the difference between repeatable reading and phantom reading?
  • When using like for fuzzy matching in MySQL, will an index be used? Surely it won't work?
  • Talk about Redis, how is it used in your project?
  • Talk about how Redis implements distributed locks?
  • Is there a cache inconsistency in Mushroom Blog, how did you solve it?
  • Talk about the problem of cache penetration in Redis and how to solve it?
  • Are there other ways to solve cache penetration? Have you learned about Bloom filters?
  • In Redis, a large area of ​​cache is invalidated, and then all requests are sent to the database. What is the solution?
  • If there is some hot data, such as news between celebrities, causing a large number of melon users to flood into the background, but the server has not cached the corresponding data, this may cause database downtime. How to avoid this situation?
  • Talk about the structure of JVM?
  • Talk about the principle of garbage collection? And garbage collection algorithm
  • Copy algorithm and mark sorting algorithm?
  • Why don't you use the tag sorting algorithm in the new generation? Or use replication algorithms in the old age?
  • Have you learned about Volatile? Talk about your understanding of Volatile
  • How does Volatile guarantee visibility? And how to achieve the mechanism of visibility.
  • What is the problem if Volatile is used extensively?
  • Talk about the threads of the operating system and its status
  • The difference between thread and process?
  • Why propose a multi-threaded application instead of a multi-process application?
  • What commands do you usually use for Linux?
  • If I need to view the port number or process number, what command would you use?
  • Tell me about another project you did? A little introduction
  • Come on, try writing a title

# 链表的两两翻# Given linked list: 1->2->3->4->5->6->7 # Return result: 2->1->4->3->6->5 ->7

The third aspect of Ali:

  • Self introduction
  • Be curious, there are not many people who use code/cloud, why not use Github?
  • How is your English level?
  • Talk about open source projects? I think this project has more than 800 likes. What are your main tasks in this open source project?
  • Shall we find some points to chat? Let’s start with ES and Solr. Are you both using them?
  • How do you implement search in SQL?
  • When using like matching, will the query be very slow?
  • Both ES and Solr use lunce at the bottom. Tell me about your understanding of lunce?
  • There are also word segmenters in lunce, such as some new words "new crown pneumonia", can it be well divided?
  • In addition to artificially maintaining the lexicon to solve the segmentation of the latest words, do you know any other better methods?
  • Do you know any other open source word segmentation libraries?
  • Talk about the dictionary tree?
  • Both Solr and ES use Lunce at the bottom layer. What is the difference between the two?
  • What is the difference between Solr's so-called cluster environment and ES's so-called distributed environment?
  • You mentioned microservices above. Have you ever understood what the concept of microservices is?
  • Your current microservices are also packaged into multiple jar packages and deployed on a server. If there is a problem with the server, the service will be unavailable. Is there a good solution?
  • Chat service registration and discovery?
  • Service registration and discovery actually depend on the concept of a registry. Will the registry hang up and cause the entire service to become unavailable? Is there any good solution?
  • Have you understood the entire election process of Zookeeper?
  • Talk about Zookeeper's distributed consensus protocol?
  • Let’s talk about indexes. Let me write you a table. Take a look at the following query. Which indexes are there?

create table 'tb' (

id int,

name varchar(64),

status int,

createtime timestamp,

PRIMARY KEY (`id`)

)

- Created three ordinary indexes

create index index_name on table('name')

create index index_status on table('status')

create index index_createtime on table('createtime')

- Given a SQL statement, determine how many indexes will be used in the following query

select * from tb where status = 1 and name = "zhangsan"

  • How many indexes are used in the above SQL? Which ones are they?
  • Have you understood the underlying index structure of InnoDB?
  • What kind of operation will be performed on the results of the two index queries? Intersection, union?
  • If you encounter some slow queries in MySQL, is there any solution?
  • Talk about explain? After the execution of the explain, those fields that appear can help us?
  • I see in your blog, there are still several articles about Redis. Can we talk about your understanding of Redis?
  • Why can Redis maintain such a high concurrent response?
  • Have understood the principle of IO multiplexing technology
  • Through one thread, will there be multiple thread switching when connecting multiple threads at the same time? (I feel like I'm in a hole...)
  • When you connect to redis through jedis, you have already connected to a process, can redis still communicate with other processes?
  • Redis can handle 100,000 requests per second. If you follow what you said above, it means that each interaction is only completed in 1/100,000 seconds?
  • Do you know the source code of Redis?
  • MySQL uses B+Tree, and SortSet in Redis uses skip tables. What is the difference between them? Why does MySQL use skip tables, or Redis not use B+Tree?
  • How do you feel about your coding skills? Then let's talk about the knowledge of the operating system and give you a question. In the operating system, there are cache, main memory, virtual memory, and external memory. Know what kind of relationship there is between them, and what are their functions?
  • For them, there will definitely be a problem, that is, when our main memory is full, or our virtual memory is full, then there needs to be a paging operation. Do you know those paging algorithms?
  • Let's talk about LRU? Ask you to write an LRU algorithm to talk about your ideas?
  • The time complexity is O(N). Is there any way to make it O(1) time complexity?
  • OK, the idea is okay, can you write an LRU algorithm by hand? (Doubly linked list + Hash?)

Answers to Ali interview questions:

The detailed answers and analysis of the technical questions in the above three rounds of interviews are organized in the document. Because there are too many parsed texts, they are not shared in the article. You need to pay attention to the answers to the interview questions and write me [document] to download by yourself

I cried on the day I joined ByteDance (Mogujie was laid off and won the offer after fighting for 7 months)

 

to sum up

This time I was able to join Ali smoothly. It can be said that my luck and strength are mixed, but I have always held the idea that good luck is always reserved for those who are prepared.

Therefore, as a technician and obsessed with a big factory, you must implement it and believe that your efforts will be rewarded. Here, I also wish you all the best in the next golden, ninety and silver ten miles, successful interviews, successful completions, and winning offers.

All the documents written in the above article are free to share. After you like if you need it, follow me and download it by private message [Ali].

Like + follow + private message [Ali], you can get the download method for free~

Guess you like

Origin blog.csdn.net/AMSRY/article/details/108940810
Recommended