Live data from Hacker News

Amazon software engineer interview

sobit.me

101–110 of 189 posts

Re: Amazon software engineer interview

#101
post #77

Earlier quoted context omitted.

Interesting and valid points. I have some things to add. Disclaimer first: I'm a technical interview coach. We run http://InterviewKickstart.com , which provides structured and intense group programs for early and mid-career software engineers, with the sole purpose of preparing for technical interviews. In an ideal world, brushing up is all what it should take before going into interviews. Practicing Software Engine…

> e.g. If they ask you to merge sorted arrays and you don't know that Heap sort is the best way to do it Sorry, I'm confused. I love heaps, but... what's wrong with this simple O(n+m) time and space solution, that I can easily prove is the theoretical limit (because the output size is O(n+m))? def merge_sorted(a, b): result = [] la, lb = len(a), len(b) ia, ib = 0, 0 while ia = lb: result += a[ia:] break if ia >= la:…

Ah, some googling got me here:

http://www.geeksforgeeks.org/merge-k-sorted-arrays/

Merge k sorted arrays. Obviously that's a job for a min heap (not heap sort though, just a heap to keep the values of the next item in each array).

Re: Amazon software engineer interview

#102
post #18

Earlier quoted context omitted.

Not the person you're asking but I previously passed the interview at Amazon. If you don't know the concepts/data structures, just read more about them, either on the internet or from a book. The internet is usually sufficient for most things but if you want to go more in depth, CLRS is the book that most people recommend. I haven't read it personally. Don't feel bad if you can't answer the questions, a lot of it is…

>CLRS is the book that most people recommend. CLRS is a good reference if you want to look up some canonical algorithm and read the accompanying discussion. It is a terrible way to learn if you're not combining it with something more explanatory, like a professor. It's an extremely dense wall of pseudocode and proofs. Kleinberg and Tardos is a little handwavy with its mathematical proofs, but does an excellent job of…

CLRS is a huge tome. I have no idea why it's always recommended as an introduction to algorithms. It seems like it has the breadth, if not the depth, of TAOCP in terms of being a perennially recommended work that no one actually reads all of the way through.

Re: Amazon software engineer interview

#103

Earlier quoted context omitted.

Yes, I bought it last week. But, couldn't answer through the questions because I didn't know the concepts and DS's. Could you answer these 2 questions? 1. Where did you learn how to implement the Data Structures and Algorithms? 2. Also, I'm in a dilemma between using Python and C/C++. Which one would you suggest?

> 1. Where did you learn how to implement the Data Structures and Algorithms? Mostly? 1st year undergrad. > 2. Also, I'm in a dilemma between using Python and C/C++. Which one would you suggest? I like Python as a quick-to-write language (whiteboard friendly), but in my most recent interview, some of the questions were phrased to make them easier to implement in C (i.e. more natural to write in terms of pointer acces…

> Mostly? 1st year undergrad.

How common is this? I did my (EE) undergrad I Florida, which has pretty extensive Gen Ed requirements. Almost nobody takes major courses in their first year.

Re: Amazon software engineer interview

#104
post #77

Earlier quoted context omitted.

Interesting and valid points. I have some things to add. Disclaimer first: I'm a technical interview coach. We run http://InterviewKickstart.com , which provides structured and intense group programs for early and mid-career software engineers, with the sole purpose of preparing for technical interviews. In an ideal world, brushing up is all what it should take before going into interviews. Practicing Software Engine…

> e.g. If they ask you to merge sorted arrays and you don't know that Heap sort is the best way to do it Sorry, I'm confused. I love heaps, but... what's wrong with this simple O(n+m) time and space solution, that I can easily prove is the theoretical limit (because the output size is O(n+m))? def merge_sorted(a, b): result = [] la, lb = len(a), len(b) ia, ib = 0, 0 while ia = lb: result += a[ia:] break if ia >= la:…

Sorry I was not very precise there. Exact question is to merge K sorted arrays, size N each. A natural extension of that problem, is to have K streams.

First part can be solved with an extension of O(n+m) solution you proposed, but when it comes to streaming, Heap works better, with the same complexity, because you don't have to know the size of the arrays in advance: https://discuss.leetcode.com/topic/2780/a-java-solution-base...

Re: Amazon software engineer interview

#105

In total I had a little less than one month to prepare for the interview. I can't help but to wonder if it was really worth it. Surely, his prep helped him get the job, but the entire prep stage he describes seems like a very high up-front cost. I've always felt that if I can't get through an interview with a little prep and my existing skills, I don't belong. You should know exactly why you want to work for Amazon.…

> It would be interesting to know more about his desire to work for Amazon that badly.

Amazon is basically the company I really, really, really want to work for, and the only reason I don't apply is that I have a small kid and a wife already working there, and I know how chaotic life would be if I did it now. So I'm waiting for the kid to grow a little more.

Now, the reason I want to work there so much is that I see them as the only big tech company providing actual value to society at large these days. Other companies have done it in the past, but it seems that now they only iterate on their old things or put out shiny but useless tech. Amazon on the other hand seems to be always coming up with new ways to innovate in ways that make people's lives more practical in a more real sense. I also admire them for basically having started the whole IaaS thing.

Another reason I want to work there is to learn. Few companies run large systems at the scale they do. From the outside (and from a little perspective I get from my wife, but she takes the whole "don't talk about what we do here" very seriously), they seem to have an awesome engineering culture - I was thrilled when I read the paper about them using formal methods to prove correctness of a number of AWS services. Working there must be a tremendous learning experience.

Re: Amazon software engineer interview

#106
post #84

Earlier quoted context omitted.

I had this view when I was interviewing for internships during this quarter. I have spent working and interviewing at a couple of places, before I came to pursue my masters and I believed people valued coming up with the solution on the spot. I interviewed at atleast 10 places for internships and every single of them asked one of the questions from either leetcode or cracking the coding interview. I found none of the…

> I believed people valued coming up with the solution on the spot. So I 100% agree with this. Being intuitively clever and being able to apply what you know is intrinsically valuable: Think of the extreme, imagine someone who is unable to apply something they've learnt unless it's exactly in the context they learnt it. That said, I think it's often underestimated how valuable prep is. Some people even get a bit salt…

I am not talking about inventing data structures or an algorithm on the spot. It takes some amount of time to find the right data structure and the algorithm. I felt that the interviewers are not ready to give that time.

Say you have not seen a particular dynamic programming problem. It takes some time to get to the fact that there is a recursive solution to it, and then apply DP to it.

For a person who has seen that problem, it doesn't take a lot of time to write the code. While interviewing, you are compared to that person. Nobody takes that extra effort to actually appreciate somebody who thought about the problem and answered it.

For a tech industry that prides itself in hiring the best / most talented, this is ironic.

Re: Amazon software engineer interview

#107
How unfair that you're expected to sign an NDA on the spot. I'm sure that Amazon and other software companies have spent tens/hundreds of thousands of dollars to protect their IP, yet you don't even get the most basic legal counsel. Why couldn't they mail it out after the phone screening? This almost feels like duress.

Re: Amazon software engineer interview

#108

I'm all for interview prep, but this sounds like a fairly standard tech company loop. I usually take a few days to brush up on algorithms and structures for the first one I do in a batch, and have some canned answers for the personal questions, but otherwise go in with what I know. Some of that's experience now, but I don't remember any point in my career where I'd have done something this extensive. I hope the poste…

You might be a more experienced person give you also regularly interview but for someone new I think 8 weeks is a good time to prepare.

Re: Amazon software engineer interview

#109
post #107

How unfair that you're expected to sign an NDA on the spot. I'm sure that Amazon and other software companies have spent tens/hundreds of thousands of dollars to protect their IP, yet you don't even get the most basic legal counsel. Why couldn't they mail it out after the phone screening? This almost feels like duress.

You aren't being coerced, so it isn't duress.

You want to interview? Sign an NDA. Otherwise, Amazon is under no obligation whatsoever to offer you an interview. Nothing is being taken from you, because you are not entitled to receive a job interview.

Re: Amazon software engineer interview

#110
> It was never communicated which languages the coding test would be limited to before I started it. Those I could choose from were C, C++, Java and a couple of others, which ruined my plans to use Go or PHP - the languages I was the most proficient in. So I ended up choosing Java.

I never get this. The first thing that should be understood by the combination of the resume and the phone screen is the candidate's preferred language.

Post reply on HN