Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Amazon
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey in the second year of graduation. I asked and consulted seniors on how to start my career. I started doing DSA, and until the end of the second year practicing DSA questions was not regular, but from the seventh semester, I started practicing DSA on regular basis. Meanwhile, I also learned Web Development in the last phase of the third year to build my profile in the field of development. Then, I think, I was ready to apply to different companies.
Application story
My friend texted me about Amazon visiting our campus, I was more than excited about this as Amazon is a well-known organization and I wanted to grab this opportunity with both hands. I enrolled in the program and started to prepare for it with sheer will. I searched for the most important topics that Amazon focus on in interviews and prepared them for the interview rounds which helped me a lot.
Why selected/rejected for the role?
I think I was on point with my coding solutions to the questions asked in the interviews. I provided the optimal solutions, and I gave correct explanations to some theory questions asked. So, I proved myself a perfect fit for their company which is why they selected me.
Preparation
Duration: 4 months
Topics: Data Structures, Aptitude, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Don't stick to a single topic too much. Cover all and prepare short notes for all the topics so it will be easier for revision. 
Tip 2 : Do projects so that they will be an added weightage.
Tip 3 : Practice a minimum of 100 questions on that particular topic so that it will be easy to crack within no time.

Application process
Where: Campus
Eligibility: 7.5
Resume Tip
Resume tip

Tip 1: Projects add good weight to the resume. So the interviewer asks questions based on that.
Tip 2: The resume should be genuine. You have to be confident of whatever is written on your resume

Interview rounds

01
Round
Hard
Online Coding Test
Duration60 mins
Interview date5 Dec 2019
Coding problem1

One coding question was there of level hard

1. Nth Fibonacci Number

Problem approach

This problem is a simple recursive problem. But time complexity of simple recursive calls is exponential. In O(long) this problem can be solved using a simple trick.

If n is even then k = n/2:
F(n) = [2*F(k-1) + F(k)]*F(k)

If n is odd then k = (n + 1)/2
F(n) = F(k)*F(k) + F(k-1)*F(k-1)

This method will solve this question in O(long).

02
Round
Medium
Video Call
Duration40 mins
Interview date11 Dec 2020
Coding problem2

1. Similar Strings

Easy
20m average time
80% success
0/40
Asked in companies
WalmartGoldman SachsAmazon

You are given two strings, ‘A’ and ‘B’ each of length ‘N’. Your task is to print 1 if ‘A’ is similar to ‘B’.

Note :

String ‘A’ is said to be similar to string ‘B’ if and only if 
1. ‘A’ is equal to ‘B’.
2. Divide both ‘A’ and ‘B’ into two – two strings ‘A1’, ‘A2’ , ‘B1’ and ‘B2’ such that both of them('A1' and 'A2') have same size. Then at least one of the following must hold true:
   a. ‘A1’ is similar to ‘B1’ and ‘A2’ is similar to ‘B2’.
   b. ‘A1’ is similar to ‘B2’ and ‘A2’ is similar to ‘B1’.
Problem approach

I solved this problem using this approach.
Let’s define the following operation on string S. We can divide it into two halves and if we want we can swap them. And also, we can recursively apply this operation to both of its halves. By careful observation, we can see that if after applying the operation on some string A, we can obtain B, then after applying the operation on B we can obtain A. And for the given two strings, we can recursively find the least lexicographic string that can be obtained from them. Those obtained strings if are equal, the answer is YES, otherwise NO. For example, the least lexicographically string for “aaba” is “aaab”. And least lexicographically string for “abaa” is also “aaab”. Hence both of these are equivalent.

Try solving now

2. Technical Questions

1. To write a function that will swap two numbers (2 or 3 fixed), i.e. if I got 2, I need to return 3 and vice versa.
2. Write SQL query for a table given by him.
3. Two classes are there Base and Derived where Derived class is inheriting Base class If we create an object of Derived class, and called destructor from it which destructor will be called first.
4. What is the difference between a Process and a Thread?
5. What is Deadlock? How to prevent it?
6. Give examples of any two Network Protocols and the layers at which they work.
7. What happens when you type URL in your browser?
8. Check whether two strings are equivalent or not, one of them being an abbreviation of the other. (Case-Insensitive)
For example String: Internationalization Abbr: I18n where 18 are the number of characters between I and N

03
Round
Medium
Video Call
Duration50 mins
Interview date11 Dec 2020
Coding problem1

1. Technical Questions

1. Draw a BST with randomly selected 12 values of your choice. Asked what’s the approach I am following while creating it. Write Code and Explain all the traversals for that particular tree. (i.e. Inorder, Preorder, and Postorder)
2. Find a Key in BST.
3. Write an SQL query to transpose a matrix.
4. Detailed discussion on one of my projects.
5. How do you design a product recommender system, If any product has been added to the cart, what suggested products will be shown below? And what always do you use to find and predict those suggestions? 
6. OSI Layers and their functionality
7. What is Deadlock? How to avoid it? 
8. How data has been stored inside DBMS?
9. What is the Relational model?
10. Write all the Permutations of a string.
11. Write a program to find all the prime numbers between two numbers.
12. Given an SQL query, check whether it is correct or not, also in which order it will get executed?
13.What are the pointers?
15. What is the memory layout in C?
16. What is Heap Segment? What will happen to data inside the heap segment, once the program got executed?

04
Round
Easy
HR Round
Duration30 mins
Interview date11 Dec 2020
Coding problem1

1. Basic HR Questions

1. Questions on my hobbies, that I have mentioned while introducing myself.
2. Tell me about your three personality traits, according to your friend’s/colleagues’ perspective.
3. How do you react to a scenario where you as an intern got converted for full time but your close friend working with you got rejected?
4. Location preference? Why are you opting for that specific choice?

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
3085 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2295 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
1593 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8962 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
12649 views
2 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
5983 views
5 comments
0 upvotes