Column | chapter nine algorithm

Url | www.jiuzhang.com

Dynamic programming, one of the most difficult aspects of algorithmic interviewing, has long been a stumbling block for students. Facebook, Google, Linkedin, Amazon, Uber, Airbnb are some of the most dynamic planning companies.

Here is a sample of dynamic planning questions that students at Amazon Onsite interviewed in August 2018. I did a test among students and found that most of them could hardly write the answer to this question without any bugs.

You have n super washing machines. At first, every washing machine had some clothes or something empty.

For each move, you can select any M washing machines (1≤ M ≤ N) and pass a piece of clothing from each machine to the adjacent machines at the same time

Given an array of integers representing the number of clothes from left to right in each washing machine, you should find the minimum number of moves such that all washing machines have the same number of clothes. If this operation cannot be performed, return -1. The range of n is 1,10000. The number of clothes in the super washing machine is in the range [0,1e5].

Sample 1

Input: [1,0,5] Output: 3 Resolution: First move: 1 0 <-- 5 => 1 1 4 Second move: 1 <-- 1 <-- 4 => 2 1 3 Third move: 2 1 <-- 3 => 2 2 2Copy the code

The sample 2

Input t: [0,3,0] Output: 2 Resolution: First move: 0 <-- 3 0 => 1 2 0 Second move: 1 2 --> 0 => 1 1 1 1Copy the code


Amazon is a well-known large factory, and the number of Software engineers recruited every year accounts for a large part of the total market recruitment.

Therefore, in order to get the Offer from Amazon, in addition to brushing questions, you also need to know the Amazon technical interview process and interview content.


Online programming test OA

Unlike most tech companies, which put an online programming test at the end of the interview, Amazon typically starts the interview with an online programming test. In this round of interviews, only basic principles will be examined, so you don’t need to worry about complex questions to test your understanding of algorithms, but be sure to review the principles of common programming languages before the interview.


The electric plane

If you successfully pass the first round of programming tests, a 40-45 minute phone call with a recruiter follows. Amazon calls are usually made on Skype. According to Amazon’s head of recruiting, the job of an online recruiter is to talk to a candidate and judge whether the candidate fits in with Amazon’s corporate culture and leadership principles. If they don’t, they can say no.

So, this aspect is also very important. Here are some tips on how to prepare for it:

1. Check the recruiter’s LinkedIn in advance

Checking the recruiter’s LinkedIn profile in advance of the call and incorporating what you learn into the conversation can help break the ice and show the candidate that you’ve prepared for the call.

2. Prepare interview questions in advance

You can read some interviews before the interview to prepare for possible questions.

3. Prepare to discuss your skills in advance

In general, most companies will only ask questions about simple principles and behavioral issues during phone calls. Not at Amazon, where highly trained recruiters who specialize in their fields discuss your technical skills in order to judge whether you’re qualified for the next round of interviews. So be prepared to discuss your skills in advance for good interview performance.

4. Find a quiet place to conduct the interview

A quiet environment shows that you value the interview and respect the interviewer.


Onsite

After passing the phone interview, the interview will be conducted in person all day long. You may have four or five interviews in one day, but there are two that you should be aware of:

1.Bar Raisers recruiting team

Although not every employee entering Amazon needs to go through The Bar Raisers interview, when Amazon recruits employees for important positions, it will generally conduct the Bar Raisers interview for the employee. Bar Raisers are mostly a group of elite evaluators in different positions. They must be recognized by them if they want to become an employee of Amazon. Even if the candidate is applying for a job in a field other than Bar Raisers’ expertise, it does not affect their voting rights over the candidate. The Bar Raisers recruiting team, which interviews candidates from other teams almost every week, is one of the ways Bezos reduces the risk of hiring the “wrong” employee, and he believes it ensures amazon gets good talent.

2. Programming interviews

Programming interviews focus on algorithms and data structures, require code implementation, and knowledge of debugging and complexity issues.

It is important to note that coding interviews not only measure coding ability, but also collaboration ability. Interviewers will look at how well you work in a team, how well you listen, and how well you handle feedback.


Welcome to follow my wechat official account: Ninechapter.



Elite programmer exchange community, regular release of interview questions, interview skills, job information, etc