Status: New grad, BS in Computer Science
Position: SDE1 at Amazon
Location: Dublin, Ireland
Date: January 2022
Interview Process
- Online code screen: solve two easy/medium array or string problems in 70 minutes.
- Online behavioural interview / work simulation: multiple choice questions related to your personality and decision making.
- Onsite: three one hour interviews. For each interview, the first half involved leadership principle questions where you had to give STAR answers and the second half was technical. Technical questions:
1. Design an cache that that receives requests and looks up the response in the cache. If the response is not there, store it in the cache and return it from the cache: https://leetcode.com/problems/lru-cache/.
2. Intersection of two arrays 2: https://leetcode.com/problems/intersection-of-two-arrays-ii/
3. Design a data structure which can get the most recently added element and max element in O(1) time: https://leetcode.com/problems/max-stack/
Experience
- I solved both questions in the online code screen with time left at the end.
- I'm not sure how I did in the online behavioural / work simulation test but I thought it was a pretty straightforward test. It's most about reading messages and emails and responding to questions so English skills are important.
- Onsite:
- I didn't design an LRU cache exactly but I did design something close to it.
- I started this question by explaining all the ways it could be solved. I started with the O(1) space, two pointers solution but abandoned it and switched to a solution using a counter dictionary which is O(n) space and O(n) time. I later realized this solution isn't quite correct because the set removes duplicates. This round was probably my weakest and I received quite a few hints.
- I was able to solve every aspect of this problem except for getting the max element in O(1) time. I suggested using a heap for this which is O(log n) time. The interview said he didn't expect me to get it though.
Thoughts
I spent a lot of time preparing by doing Amazon-tagged Leetcode questions but I found that the interview was quite different to the questions I practiced.
Differences between the real interview and Leetcode preparation: in the real interview, the questions were simpler but much more ambiguous. I had to spend quite a lot of time asking questions and understanding what the problem was. Also I was coding in a text editor instead of an IDE which was more challenging because I wasn't able to run the code. The interviewers seemed to care more about my thought process than whether the code ran correctly.
Recommendations
I think I passed because I asked a lot of questions, could code up my ideas quickly and switch between possible approaches quickly. Unlike Leetcode, the interview is a collaborative and ambiguous process so I think there is no substitute for doing actual interviews.
I recommend knowing the syntax of the programming language you know very well to save time because you might only have 30 minutes for each question (I used Python which I know well). I think spending a lot of time practicing leadership principle questions helped too. Amazon has a leadership principles worksheet which you can download.