Open In App

Amazon Interview Experience 9 For SDE-1

Last Updated : 02 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Previous Position – Software Engineer II

Previous Organisation – Sabre

Location – Bengaluru, India

Years of Experience – 1.5 years of Experience

The recruiter reached out via email with the job description (JD) and I responded positively.

I received the test link for the Online Assessment (OA).

Online Assessment(OA) :

Problems were manipulated a little in the form of a story but got deduced to the following-

Problem 1 (LC- Medium): https://leetcode.com/problems/k-closest-points-to-origin/description/

Problem 2 (LC – Hard):

  • Demolition Robot
  • Given a matrix with values 0 (trenches), 1 (flat), and 9 (obstacle) you have to find the minimum distance to reach 9 (obstacle). If not possible then return -1.
  • The demolition robot must start at the top left corner of the matrix, which is always flat, and can move on the block up, down, right, and left.
  • The demolition robot cannot enter 0 trenches and cannot leave the matrix.

Sample Input :

[1, 0, 0],

[1, 0, 0],

[1, 9, 1]]

Sample Output :

3

I was able to solve both problems with all test cases passed.

Telephonic Conversation with HR (5-10 mins)

The Amazon recruiter informed me that I had cleared the OA round and would like to proceed ahead for a virtual interview. She said the interview process will consist of 2 Technical Rounds of 1 hour each:

  • Technical Round 1 – DSA
  • Technical Round 2 – DSA

I received the Amazon Chime invite. Both rounds were scheduled for the same day.

Technical Round-1(DSA) : (1 hr)

We started with our introductions. The interviewer, an SDE-2 at Amazon with 7 years of experience, explained the interview process, which would consist of 2 DSA problems for 45 minutes each, with the remaining time dedicated to behavioural questions.

He shared a live code link to solve the problems.

DSA Problem 1 (LC- Medium): https://leetcode.com/problems/asteroid-collision/description/

The platform was an online code editor. He was interested in logic first, and then the implementation of the code in any language of choice.

  • I explained the problem and the brute-force approach.
  • Then I discussed a stack-based implementation for optimization.
  • We went through some inputs to dry run and explain. Then we discussed some edge cases.
  • Finally, we discussed the time and space complexity, both worst and best cases.

DSA Problem 2 (LC- Medium) : https://leetcode.com/problems/coin-change/description/

  • I explained the problem and the brute-force approach.
  • Then I discussed a DP-based implementation for optimization.
  • We went through some example inputs for a dry run.
  • Then we discussed the space and time complexity.

Lastly, we discussed some behavioural and situation-based questions:

  • Did you encounter a situation where you had to refer to the documentation for the implementation of any solution?
  • What is the worst thing you felt and thought could have been improved in your current codebase?
  • What are some new technologies or coding practices you learned in your previous projects?

By then, we were done with the interview. He asked if I had any questions for him.

Feedback: Positive. The interviewer was supportive and gave ample time to think about the solution. We discussed the corner cases in detail.

Technical Round-2 (DSA) : (1 hr)

We started with our introductions. The interviewer, an SDE at Amazon with 5 years of experience, went straight to problem-solving.

He shared a live code link to solve the problems.

DSA Problem 1 (DP): The problem was story-based. You are an Amazon delivery guy who needs to deliver parcels to buildings painted in different colours. Your task is to reach the end of the buildings in the minimum number of steps.

You are allowed to have the following operations standing on the ITH building:

  • You can take a step forward or backwards, i.e. (i+1) or (i-1).
  • You can go to the JTH building with the same colour as that of the ITH in one move.

Eg. Input : [ 1 0 0 2 1 3 ] (Starting from 0th index -> 4th index -> last index)

Output : 2

  • It was a new problem for me. I thought to relate it with https://leetcode.com/problems/reach-a-number/description/
  • But could not come up with a solution.
  • After wasting 20 mins, I asked if he could change the problem.

DSA Problem 2 (Graph) :

There are a few projects in Amazon which have dependencies on another project.

E.g.

a -> b

a -> c

c -> d

Input : [(a,b), (a,c), (c,d)]

Output : d -> c -> b -> a

Find the correct order of execution of the projects.

  • It was again a new problem. I thought to use topological sort-based logic on it. Took another 20-25 mins
  • Had explained my logic to him and started coding.
  • But could not come up with a correct solution as was running out of time.

He said that he would need to conclude the interview as I wouldn’t be able to complete it on time.

Feedback: Negative. Could not come up with a solution to any of the problems.

Tip: I was not very well prepared with graphs and DP-based problems. Try to focus more on these areas while preparing for Amazon.

Verdict: Haven’t received any call yet, but considering the performance in the last round, it’s a REJECT.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads