preface

Nowadays, more and more people have to brush dozens of questions before applying for a job, and it feels like they won’t pass the interview.

Whether it is the front and back end, mobile development, it seems to have to brush, so many people brush through the interview, brush to find a job or helpful.

But there’s a problem: Many people don’t understand why companies are looking at candidates this way, even though they’re trying to get a job. There are many people indignant: “I am an architecture, mobile development engineer, you don’t ask me project experience, development experience, but to ask me algorithm questions, play?”

Yes, come to think of it, it is understandable to ask more algorithmic questions in an interview since fresh graduates have no experience in work projects. But for a few years of work for an old programmer, in the work has few handwriting algorithms, more advantage is the project experience, in the interview also let handwriting some algorithms, such as the common ten sorting, search and other basic algorithms, is not some off-topic?

Is it really so?

In fact, most of the time, the people who complain that the interview only asks algorithms are the people who didn’t write algorithms in the interview. Enterprises are not only asking about algorithms, but also about projects, system design and other knowledge, knowledge he has not yet reached that step on his knees.

Companies have several rounds of interviews, usually at the beginning are written questions, if passed, then will ask resume. Those underappreciated “old birds”, are generally not brush enough questions, so in the interview ahead of schedule out.

Will companies miss out on the best programmers? Like the kind of experienced, practical strong ox?

Generally, it will not, because the current Internet industry practitioners too much too much, large base, outstanding people are particularly many. For example, there are 100 people interview, the enterprise only recruitment 10, so you ranked in the 11th is not good, because the enterprise must be able to find the kind of: algorithm is very good, work experience is also rich, all aspects are very good people!

In this case, even if your development ability is very good, especially rich work experience, architecture design ability is also very strong, the enterprise can find a similar to you in other aspects, but also brush the question is good.

Remember many years ago, being able to drive a car was also a very powerful skill. At that time, cars were not particularly popular. Those who could get a driving license in the early days could get a good salary to drive a truck or be a driver for others. Almost everyone can drive now.

At the beginning of an industry, there is always a bonus period. For example, there will be a bonus period for Taobao and we media, and the Internet industry will also have a bonus period.

In 2000 or so, there were very few software engineers, and it was not very difficult to enter the enterprise to write code, and the salary was very high. In Beijing, one could get 4000-5000 yuan a month, while the housing price in Beijing was several thousand yuan per square. Most software engineers at that time bought a house in Beijing and enjoyed the dividend of the Internet.

By 2021, the Internet has become relatively mature, and more and more employees are employed. This trend can also be seen from the scores of computer majors in universities. In the college entrance examination, I applied for the major of architecture, mechanical engineering and vehicle engineering, which were popular at that time. However, I was transferred to the computer major, which was unpopular at that time. By the time I graduated, my computer science major was dozens of points ahead of some of the most popular majors I had entered.

Due to the high salary and earning power of the Internet industry, a large number of people are attracted to the industry. High school graduates apply for relevant majors, and many students of other majors change majors during college. Many students who take the postgraduate entrance examination also change majors, resulting in a sharp increase in the number of employees and fierce competition in recent years.

There are more and more software engineers, and there are more and more good software engineers, and there is no shortage of good people. So the algorithm as a threshold.

How do you verify the power of your algorithm?

Take a look at these big factories below to take an examination of classic problem 👇 first

  • What are the requirements for Object as the key of a HashMap?
  • A hashset contains ordered numbers.
  • Enter a binary tree and an integer, and print the sum of the node values in the binary tree equal to all the paths of the input integers
  • The search interval of a binary tree
  • Now I have a one-way linked list. How can I tell if there are rings in the list
  • Replication of random linked lists
  • Find a pair of combinations neutralized by S, just find one
  • Find the maximum sum of continuous subvectors in an array
  • How do you get a median in a data stream?
  • What sort algorithms do you know, what is the time complexity of each algorithm, explain quicksort?
  • Please explain the usage of stack, heap and static area in memory.
  • What’s the difference between heap and stack?
  • Would you please design an algorithm to compress a URL?
  • Id global unique and increment, how to implement?
  • An integer array of length N, where each element is in the range of [0,n-1]
  • May I ask what are the methods for finding the KTH largest number and their respective complexity? In addition, when there is the same element, what different methods can be used to find the KTH largest element
  • To determine if a linked list is a palindrome, say what you think and write the code

.

Confused? How many questions can you answer? Don’t worry, there are ways to brush the questions, the content of Leetcode is complicated, and the information on the Internet is intermingled with good and bad. It is not easy to sort it out by yourself. In order to help you enter big factories smoothly, we studied the interview question types of each big factory and concluded the “100 big factories algorithm required interview questions + detailed answers”.

1. The hash

  • How does HashMap in Java work?
  • What is a Hashmap?
  • Let me tell you how to construct a consistent hash algorithm.
  • Why are the hashCode() and equals() methods important?

2. The binary tree

  • Find the maximum depth of a binary tree
  • Find the minimum depth of a binary tree
  • Find the number of nodes in a binary tree
  • Find the number of leaf nodes in a binary tree
  • Find the number of KTH layer nodes in the binary tree
  • Check whether a binary tree is a balanced binary tree
  • Determine whether a binary tree is a complete binary tree
  • Are two binary trees exactly the same
  • Flip binary tree or mirror binary tree
  • Whether two binary trees are mirror images of each other
  • Find the lowest common ancestor node of two binary trees

3. The linked list

  • What are the disadvantages of a bucket if it is stored in a linked list?
  • If I have a linked list with odd digits ascending and even digits descending, how do I change the list to ascending?
  • How to reverse a singly linked list
  • Now I have a one-way linked list. How can I tell if there are rings in the list
  • Replication of random linked lists

An array of 4.

  • Write an algorithm that rotates a two-dimensional array 90 degrees clockwise.
  • An array where everything is equal to each other except one element. What element?
  • Find a pair of combinations neutralized by S, just find one
  • Find the maximum sum of continuous subvectors in an array
  • Find the first K largest numbers in an array

5. The sorting

  • Write a bubble sort in Java?
  • So, what are the different kinds of sorting methods? Please list them
  • So, what does merge sort do?
  • So what’s heap sort?
  • How do you get a median in a data stream
  • What sort algorithms do you know, what is the time complexity of each algorithm, explain quicksort?

6. The heap and stack

  • Please explain the usage of stack, heap and static area in memory.
  • What’s the difference between heap and stack?
  • The smallest number of k
  • Maximum sliding window
  • Ugly number before
  • The first K high frequency elements
  • Valid parentheses
  • Minimum stack
  • The largest rectangle in a bar chart

Advanced algorithms

  • Can you explain the implementation principle of LRU algorithm?
  • Why design postfix expressions and what are the benefits?
  • Would you please design an algorithm to compress a URL?
  • Id global unique and increment, how to implement?
  • The length of the last word

8. Dynamic planning

  • Fibonacci number
  • Different paths
  • Climb the stairs
  • Change change
  • Al shabaab
  • Edit distance

Due to space limitation, some screenshots of the content are shown. If you need these documents, you can support me by clicking “like” and then[Click here]Read and download for free

I hope all programmers can learn to realize our dream of dachang!