编程知识 cdmana.com

What is the use of writing questions? It's useless for you to brush your questions like this

WeChat search 「 Yard farmland, Xiao Qi 」, Focus on this program in New York , reply 「01-05」 You can get a selection of computer books 、 Personal writing notes 、 Big factory surface 、 Interview materials and other resources , mua ~

Question about the brush , The last article talked about How, Let's talk today Why —— Why should I brush the title ?

Maybe a lot of people didn't think about it , Or because of the interview , you 're right , That's why , This is one reason enough for us to brush up on the topic . But today we're going to talk about something different , Hope to give you new inspiration .

Algorithm before , What does the interview test ?

I have been in this article 《 from LRU Cache Show you the nature of the interview 》 It was mentioned in part that , Interview with a large American factory 80% It's all about algorithms , This is actually the latest 5-10 Google 、 Yahoo was the first to rise ; Although domestic large factories are not so enthusiastic about the algorithm , But more and more attention has been paid .

So why did this happen ? What are they testing before they test algorithms ?

You have two pots , The capacities are 5 L and 3 l , There is also a pond of water . Without the aid of measuring tools , Ask if you can take it out accurately 4 Lift water to ?

It takes 15 minute , But you don't have a timer . Now I'll give you two ropes , It takes an hour to burn a rope ; And the rope is uneven in thickness , It's possible that half a rope will burn out in a few minutes .

How many golf balls does it take to fill a school bus ?

This kind of question is called "Brain teaser", It's not just technology companies a decade ago , Today's financial companies are still testing , For example, I was interviewing just after graduation Quant,Risk You'll be asked this question in your position , I've also prepared for this .

At that time, the Internet industry was just emerging , There are many unknown problems every day , So you need “ A wise man ” To find a way to solve these problems , So the core of the interview is to select the smartest person .

Why test algorithm ?

Then there was the rise of the Internet on a large scale , It takes a lot of engineers to solve the problem , So the core of the interview is how to select people who can solve common problems 、 People who write valid code .

A solid basic skill , The logic of thinking is strong , People who can write effective code are qualified for these positions , So the Internet company's interview rules have changed .

The massive expansion of the Internet industry has lowered the threshold of the industry , Although it is still a high wage industry , But the threshold for the individual has been greatly lowered , Not even the background or the major , Everyone has a chance to get into the top companies .

Most Internet companies think , The algorithm is very effective in screening out the engineers they want .

Algorithm , One is to be able to examine the interviewer's ability to think and solve problems , The second is to investigate the basic skills of writing code .

A person who can pass the algorithm interview is likely to be qualified for the position of engineer , Not up to that and pip Wait ; A large number of people who can't pass the algorithm interview are not qualified for the job .

Yes, of course , Some excellent talents may be missed , But the truth is , Big factories don't care about .

Interview is the most efficient way to select the needed talents , It's better to process 、 Standardization , If employees are required to invest too much in the interview , There's no time to work hard ?

So algorithms are like college entrance examination , It can help enterprises quickly select talents , And it's more cost-effective than other methods : The cost is low 、 The effect is good .

But if you're good at something , Or experts in a field , You don't have to go through this standardized interview . Just like the entrance examination, there will be special students 、 Orsay's walk and so on , But actually , This way, , Harder to .

So what I said above is more about junior engineers , That is, the students who just graduated , No internships, no heavyweight projects , What do you want to investigate ? That's a calculation , The algorithm is really a shortcut to the big factory .

Algorithm , It's just algorithms ?

Some people said , After learning the algorithm, I can't use it in my work , What's the use of learning it ? I can work without learning .

Then I want to ask , You have learned the operating system, and you have not been asked to write an operating system in your work , Learning the front end didn't let you develop a browser , After learning database, I didn't let you create a database , So how to learn a data structure? You must think about building a data structure ?

Now most of the work is to use these tools directly instead of rebuilding the wheel , This is also the reason why the Internet industry can develop on a large scale , It's like the creation of chain stores , And you don't need every employee to produce core products .

however , Once you need to build wheels , Like developing new products , There must be a lot of algorithms ; Well, if you're not in these positions , Nature is unnecessary .

That also explains why big factories like to test algorithms , Small companies pay more attention to whether you are familiar with the use of a framework , After all, small companies want you to work directly .

That's not in these positions , No algorithm at all ? Neither .

For me, , The algorithm has affected all aspects of me .

For example, a very common question , In the work debug when , Not from the first one , It's the idea of binary search , First find an intermediate location to set the breakpoint , Check whether the information of this location is correct , And then gradually narrow the search scope , Finally find the problem . This idea comes from Leetcode The algorithm of binary search on the original question .

Template , Are you still using templates ?

Speaking of binary search , Some students have asked me which template is good , I was stunned , There are many templates ?!

I didn't mention the template in my last article , Because I don't use templates at all , I think if you use a template, you don't understand the algorithm clearly .

There are many variations of binary search , Some people always want to use a template to cover all situations , There will be such a template , But this template must not be the optimal solution for all cases .

In the interview, the interviewer changed the conditions a little , I'll ask you more about it , Is that ok , You'll show it .

what's more , It's really useless to recite the template ! This kind of algorithm can't be used in the work , To be practical debug Do you want to set a template ? Is it debug when , You have to flip the template first , And determine which direction to look for bug?

Companies hire people to solve problems , If a set of templates can solve the problem , Why pay high salaries to solve this problem ?

So it's no use writing questions , It depends on how you brush , Different people write the same question , The effect may be completely different . Just like we did math problems in high school , It is not for the purpose of meeting the original question in the college entrance examination , It's about exercising your mind 、 Ways of thinking , Only in this way can we solve new problems easily .

Yes, of course , I don't want the myth to brush the title of the role , Some jobs just don't need , you 're right , Then work hard .

After working for a few years, the proportion of the algorithm in the interview is bound to decrease , One job 5 An engineer in 'went to interview , If you ask an algorithm question , After that, you'll get one senior Position ; And a new graduate student goes to interview the same algorithm question , No matter how good the answer is , Also only entry level, That's the difference , The difference is in what's outside the algorithm .


Okay , Those who want to enter the study room and brush questions can continue to add me wechat , Last week did not add to the hurry up time .

If you don't know the self-study room, you can watch this video to learn about it , The content of study is not limited to brush questions , There are all kinds of punch cards in the front end and back end of English fitness , You are welcome to join us .

This is Qi , Lifelong learner , See you next time !

版权声明
本文为[Yard farmland]所创,转载请带上原文链接,感谢

Scroll to Top