“At the end of the article, there is a way to bypass the algorithm exam into the big factory (no advertising)”

01

I believe that many students hate the most is to test the algorithm, in fact, I also hate, dachang algorithm is looking for a job is the most fun topic. After all, in practice, it is impossible to implement a classical algorithm from the ground up.

However, algorithms are the focus of the interview. There are even some big companies that only test algorithms.

When I was a junior high school student, I often read the interview questions of Microsoft as “science fiction”. The drawing style is as follows:

  • Why is the picture in the mirror reversed, rather than upside down?
  • How and why are manhole covers round?
  • How do you move a mountain from one place to another?
  • Five pirates divided 100 gold pieces. They made it A rule that starting with A proposal to divide the gold, the rest of the pirates would vote for or against it. If the number of votes against was greater than or equal to the number of votes for it, A would be thrown into the sea. If A is thrown into the sea, it is then B’s turn to propose, and the same rules continue. Assume that every pirate is extremely intelligent and acts in their own best interest. How are the 100 gold pieces divided?

In general, these questions have little to do with algorithms, and might be better described as “intelligence questions.” At that time, the computer industry was still a new industry, facing many new problems every day, and the way to deal with these problems was not set in mind. It is probably in this situation that Microsoft wants to select the most creative talents, who can be flexible and innovative in dealing with various problems encountered in the work.

As the computer industry matures over time, programmers grow exponentially. Creativity, while still significant, is no longer the only indicator of talent selection. A logical thinking strong, solid basic skills, also can be very good for the role of programmers.


So far, the interview of Internet big factory entered the second stage, give priority to with algorithm problem.

In fact, this is not a bad thing, because in the future, ordinary people through training can also enter the big factory, which means that the threshold of the computer industry is lowered. The lowering of the threshold of an industry means that the industry can expand into a thriving scene.

02

A recognized talent selection model consists of three parts:

  1. General problem thinking ability;
  2. Professional ability;
  3. Character, three views.

Leaving aside clauses 2 and 3, general problem thinking ability is to take professional ability to see how well a person meets a non-professional problem.

It’s a big category, imagination, creativity, memory, and so on. The “intelligence questions” above are largely about general problem thinking.

Unfortunately, the current consensus among most Internet companies is that algorithmic interviewing is a good way to consider both “general problem thinking” and “professional competence.”

It is well understood that algorithmic problems can be well examined. How does the algorithm measure general problem thinking ability well?

Because, solving algorithm problem is a typical “learn to apply” process. For students majoring in computer science, basic algorithms and data structures have been learned almost in the first two years of university. There are roughly that many data structures, there are roughly that many classical algorithms. But can the interviewer synthesize this knowledge to solve algorithmic problems? You know it’s not that simple.

We’re often faced with similar situations at work, where languages are out there, apis are well documented, development tools are readily available, and open source projects are available on Github. Can we make the right combination of all of this to achieve the functionality we want?

Solving algorithmic problems is almost a miniature of this problem solving model.

03

There is, of course, another type of interview question that better simulates these “real questions” : system design questions. Such as:

  • How to design a Taobao?
  • How to design a Baidu search?
  • How to design a Douyin short video?
  • How to design a wechat?
  • How to design a message delivery service?
  • How to design a notification system?

However, the biggest disadvantage is that it is easy to be superficial if you only look at system design problems.

For example, in the face of performance problems, we can use caching mechanisms. However, it is certainly not enough to say exactly what might go wrong in implementing a caching mechanism.

Interview time is precious, so the interviewer can’t make every student implement a complete caching mechanism. As a result, it is often difficult to get to the code level when looking at system design problems.

It is more important for programmers to implement code correctly than to know a few terms such as cache. A lot of people talk a good game about this concept, but when it comes to writing code, it shows.

Algorithmic interviews, while smaller in size and more limited in nature, can test a programmer’s ability to actually write code.

04

Even if the algorithm problem, I believe we all have experience. It’s easy to describe a solution to a problem, but not so easy to actually implement it in code.

For a specific engineering design problem, people without professional training are easy to ignore the complex details and think of the problem as simple. Building a house is nothing more than putting a roof on top of four walls, which involves a lot of complicated engineering problems. So what seems simple to the layman is actually quite complex.

Such as:

Isn’t a leaderboard just about ranking?

But can it meet performance standards?

Aren’t search engines just about presenting relevant information on the Internet?

But how do you define “relevant information”?

Isn’t wechat Pay just about scanning the code and paying?

But how to avoid payment failure caused by network fluctuation?

Kruskal minimum spanning tree algorithm, the idea is very simple: sort all edges, then select edges from small to large, as long as there is no ring with the existing edge, select, otherwise discard.

To implement the specific code, how to determine “whether to form a ring with an existing edge”?

Historically, the idea of The Kruskal algorithm emerged very early, and it did not become a practical algorithm until people realized that they could use a look-up set for ring detection.

Therefore, the core value of a programmer is to implement features in code, not to talk about ideas or concepts.

05

Of course, if you meet a really talented interviewer, the interviewer just talk about a few concepts, in fact, it is not possible to muddle through. An experienced interviewer is sure to be able to ask in-depth questions about the level of the candidate. But that’s asking a lot of the interviewer.

A good programmer should spend most of his time getting work done, not going to interviews.

That brings up another advantage of algorithmic interviewing: the interviewer is prepared.

For system design problems, the level of the interviewer is much higher than that of the interviewer to be able to truly identify the interviewer. Algorithms are different, even if the interviewer’s algorithmic skills are lower than the interviewer’s. Because the interviewer can directly look at the answer, understand the clear thinking and code on the line.

And that’s why:

Just because an algorithmic interviewer asks you an algorithmic question and you don’t get it right doesn’t mean he’s better than you. Because you’re in a position of information asymmetry.

06

There are more advantages to algorithmic interviewing, of course.

  1. Language independent: whether compiled or interpreted; Both front-end and back-end languages can be used to solve algorithmic problems;
  2. Low hardware requirements: no very specific environment or configuration is required; It can be done in a corporate conference room, on the road, in person, or remotely. You can start with a piece of paper;
  3. Using algorithmic questions, it is easy to compare differences in the level of candidates. Problems in other domains are not as likely to produce as many seemingly repetitive problems at different levels of difficulty as algorithmic problems. Whether it’s depth or breadth, whether it’s easy or hard, there will always be the right algorithmic questions for the interviewer to choose to test the upper limit of your ability;
  4. Because there are so many algorithmic questions to choose from, it’s very easy to hire on a large scale using algorithmic interviews. Conduct hundreds of interviews over a period of time, and the questions will never be the same. In this way, the problem of leakage is avoided.

But the biggest drawback of the algorithm is that it is easy to miss talent. Just because someone isn’t good at algorithms doesn’t mean they’re not good at computer science.

What if the big companies miss out on talent?

They probably don’t care

With resumes pouring in anyway, they just have to hire enough people to meet their needs.

Generally speaking, people who are good at algorithms are almost always good at being software engineers. Conversely, people who are not good at algorithms are more likely not to be talented, although they may be.


07

The reason many small companies don’t test algorithms is because they don’t need to test general problem solving skills. Small companies pay more attention to the examination of professional ability. Being able to work is all that matters. They are not exposed to as many creative problems.

There are algorithms for recruiting domain experts, but the difficulty is significantly reduced. The most typical example is the algorithm “flipping binary trees” given by Google during the interview with Homebrew author Max Howell. This problem is an easy one in Leetcode, but he doesn’t write it out

08

So it’s time to figure out how we can get into big factories without taking algorithms, which is, of course, becoming domain experts. Companies can’t treat you like you’re just another job applicant.

Before there is a tsinghua a student with excellent grades, in their own WRITTEN CPU running their own written operating system, such talent, big factory this regardless of minutes to rob, who still care about your algorithm write good ah.

Then again, becoming a domain expert is harder than mastering basic algorithmic interview questions. But a lot of the time we are not satisfied with reality and seek other shortcuts.

But the other way is actually the harder way. And we tend to forget that what’s right in front of us is actually a shortcut.

(Anyway, I’m going to practice my algorithm.)


Here is Xiao Wang, a few paragraphs, share life.