Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Amazon
upvote
share-icon
5 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Journey
I joined a tier 3 college and worked hard to master DSA. I got placed in a startup initially. Along with my job, I used to practise DSA so that I can apply for product-based companies as well. Finally, I got a chance to apply for Amazon. I revised all the main DSA algorithms and gave some mock interviews in order to prepare well.
Application story
I started updating my resume and profile on Naukri.com due to which the companies started to contact me for the required jobs. Luckily my resume got shortlisted and was asked by the HR to go through the all the rounds.
Why selected/rejected for the role?
I was selected because I had in-depth understanding of DSA topics. Moreover, I knew everything that I had worked on in my previous company. So, I was able to answer all questions clearly and confidently.
Preparation
Duration: 7
Topics: Data Structures, Algorithms, OOPS, Graphs, Trees
Tip
Tip

Tip 1 : Start with the basics if you have lost touch with competitive coding. Don't directly jump to interview questions.
Tip 2 : Create a timetable and set goals. Keep aside 3-4 hours for studying. Consistency is the key.
Tip 3 : Focus on medium and hard questions. Solving a lot of easy questions doesn't help.

Application process
Where: Naukri
Eligibility: None
Resume Tip
Resume tip

Tip 1 : You should have good projects to showcase.
Tip 2 : Keep it clean and simple.

Interview rounds

01
Round
Easy
Online Coding Test
Duration90
Interview date6 Sep 2020
Coding problem2

Two coding questions were asked and 90 minutes of time was allotted to solve both the problems

1. Two Sum

Easy
10m average time
90% success
0/40
Asked in companies
SiemensTata 1mgSamsung R&D Institute

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

View more
Problem approach

Sort the array and find the target sum with 2 pointer technique.

Try solving now

2. Shortest Path in a Binary Matrix

Moderate
37m average time
65% success
0/80
Asked in companies
SamsungGoogleOracle

You have been given a binary matrix of size 'N' * 'M' where each element is either 0 or 1. You are also given a source and a destination cell, both of them lie within the matrix.

View more
Problem approach

Solved it using BFS. Created a queue. First added the source cell to the queue and distance as 0. In the loop(with loop being empty as terminating condition.), popped a cell and distance. Added its neighboring cells containing 1 or 3 and distance+1. Marked the cells as visited.
If the popped cell is the destination, then returned the distance.

Try solving now
02
Round
Medium
Video Call
Duration60
Interview date13 Sep 2020
Coding problem2

The duration was approx 1 hour. The interview was taken by a young SDE-2.

1. Count Frequency

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrCognizantHewlett Packard Enterprise

You are given a string 'S' of length 'N', you need to find the frequency of each of the characters from ‘a’ to ‘z’ in the given string.

Example :

View more
Try solving now

2. Fire in the cells.

Hard
15m average time
85% success
0/120
Asked in companies
AmazonPaytm (One97 Communications Limited)VMware Inc

You are given a matrix 'MAT' of size ‘N’ * ‘M’, where ‘N’ is the number of rows and ‘M’ is the number of columns. Valu...

View more
Problem approach

Solved using BFS. Maintained 2 queues this time, one for fire cells and another for movement cells.
Returned True if the person reaches an edge cell. Mark each firing cell, visited cell, and movement cell as 0 so that it is not added to the movement queue going ahead. Initially added all the fire cells to the fire queue. In one iteration, add the possible safe cells to the movement queue and...

View more
Try solving now
03
Round
Hard
Video Call
Duration60
Interview date13 Sep 2020
Coding problem2

The interviewer introduced himself and asked me to introduce myself.
I told him about the different projects that I had done and the work in the previous company.
I had worked on AWS(Amazon Web Services) so he asked me all the AWS services that I had worked with and to explain one of them. 
I explained about the working of ECS(Elastic Container Service).
After this, he moved to the coding questions.

1. Maximum 0-1 Distance

Hard
10m average time
85% success
0/120
Asked in company
Amazon

You are given an N*...

View more
Problem approach

Solved using BFS. Initialize distances for all zeroes to be infinity. Add 0 cell to queue if the distance is less than the already calculated distance. Used extra loop for levels in BFS. When the queue gets empty, the last level gives the maximum distance

Try solving now

2. Search for integers with given difference and at given distance

Moderate
20m average time
85% success
0/80
Asked in company
Amazon

You are given an array consisting of 'N' non-negative integers, and two non-negative integers 'K' and 'M', your task is to ...

View more
Problem approach

As we traverse the array, maintain another array that stores the last k elements in ascending order. Find the position of the current element in the sorted array and check the absolute difference between the preceding and next element. If the absolute difference is less than equal to t then return the two values. Remove element at i-k from sorted array.
Time Complexity: O( n log(k) ), where ...

View more
Try solving now
04
Round
Medium
Video Call
Duration60
Interview date17 Sep 2020
Coding problem1

The interviewer was a very senior person with at least 10-15 years of experience. He introduced himself and asked me to tell him about myself. (Leadership principle questions followed)
 

1. Special Binary Tree.

Easy
15m average time
90% success
0/40
Asked in companies
AmazonWipro

You are given an arbitrary binary tree. A binary tree is called special if every node of this tree has either zero or two children. You have to determine if the given binary tree is special or not...

View more
Problem approach

Solved using DFS. Similar to mirror trees. Pass root left and root right as arguments to the is _mirror_tree function. First explained the approach to the interviewer. He was satisfied and asked me to write code.
 

Try solving now
05
Round
Medium
Video Call
Duration60
Interview date28 Sep 2020
Coding problem2

The interview started with introductions and some Leadership principle questions. The interviewer was again a senior person with at least 10-15 years of experience.

I was asked to explain some AWS services.
He asked me to tell about a time when I had a tight deadline and how I worked during it.
He asked me about a time when I took initiative and came up with something new which helped the entire team.
I had prepared well for the LP questions and was able to answer everything.
After this, we move on to coding questions.

1. Check if the Word is present in Sentence or not

Easy
15m average time
90% success
0/40
Asked in companies
AmazonWalmartIntuit

You have been given a sentence ‘S’ in the form of a string and a word ‘W’, you need to find whether the word is present in the given sentence or n...

View more
Problem approach

Discussed the solution using the hash map. He was convinced and asked me to code. I wrote a well-commented code and he was happy with it.

Try solving now

2. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
CIS - Cyber InfrastructureIntuitGoldman Sachs

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

View more
Problem approach

I had solved it earlier and explained to him the approach using doubly Linked List and Hash map.
He was convinced with my approach and asked me to code it without using any in-built data types. He asked me to write classes. I had prepared the solution with classes and started writing the code.

Try solving now
Join the Discussion
4 replies
profile
Channurani |Level 5
23 Jan 2023
Edited

Thank you for giving tips for Preparation 

Helpful

1 upvote
1 reply
Reply
profile
28 Aug 2021

they have asked u only Btech academics or 12th and 10th alsoand how they are selecting by Btech cgpa or 12th & 10th

 

3 upvotes
0 replies
Reply
profile
18 Aug 2021

How can we prepare for LP questions

0 upvotes
0 replies
Reply
profile
15 Jan 2021

Hello

0 upvotes
0 replies
Reply
Similar interview experiences
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Amazon
1258 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
0 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
781 views
1 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
228 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
46496 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
10466 views
2 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Google
8762 views
0 comments
0 upvotes