Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Amazon Interview Experience for SDE1

  • Difficulty Level : Hard
  • Last Updated : 28 Aug, 2019

Online Round:

Test Pattern: 20MCQ and 2 coding question

Time : 1:30 hours

MCQs were based on operating System, data base management system, computer networks, data structures and standard questions of computers. MCQs were of intermediate level. one can easily do all the questions correctly if has basic understanding of topics.

Coding Problems:

    1. It was a easy question to reverse a string taken k length at a time. i.e. Input: String=”amazoninterview”, k=5¬† ¬†Output: “ozamaetninweivr”
    2. It was a basic graph problem. click here

F2F Interviews:

There were 4 rounds and all rounds were technical round.

Round 1:

It started with general introduction and then interviewer told me the process of interview as 2 questions will be asked and first you have to tell the approach and be able to write the code included with space and time complexity.

first question was to count the number of set bits in a given range (a, b). the question was really easy and i was able to do it in time complexity O(n*log(d)) and space complexity O(1). and he was satisfied with the answer.

second question was, there is an infinite grid in first quadrant and a sequence of coordinate of first quadrant in particular order and one can move in all 8 directions from a point in grid . you have to calculate the minimum number of steps to reach the last indexed coordinate of sequence following the same order as sequence. At first i explained BFS approach but he told to reduce the time complexity and then i was able to do it in O(n).(explanation: move to an intermediate node diagonally and then take the manhattan distance).

infinite grid problem

at last we discussed about amazon for 10 minutes which is much needed for a good impression.

Round 2:

It started with introduction and projects i have done in college and it goes for approx 30-40 minutes. he was asking about the overview of major project. after that he asked a programming question.

There are 3 sorted arrays({A1, A2, A3}) and you have to computer number of triplet {i, j, k} such that {i, j, k} belongs to {A1, A2, A3} respectively and i<j<k. and he asked to write code clearly and should not fail for any edge case. and i was able to do it in linear time Complexity and without any extra space. and he was satisfied with my answer. and again we discussed about company for approx 5-10 minutes.

Round 3:

It again started with general introduction. and then he asked basic questions from Operating system, Computer networks and database management system.

Operating System: There is a game which requires 4GB RAM memory and i have a system with 2GB RAM. Then which concept the system will use to run the game.

Computer Network: How any url is processed in details like how it find DNS server etc.

DBMS: which properties RDBMS should follow? then what is normalization and denormalization and why we need it explain with example.

Then He asked, There is a tree having node values as ‘T’ and ‘F’ only. write a function which should return the largest subtree having equal number of ‘T’ and ‘F’ nodes. I was able to do it in O(n) time complexity and O(1) space complexity and he was satisfied with answer.

after that he asked There is a sorted array in which except one element all elements have a duplicate number. write program to find unique element from array .First I told him XOr approach and checking next number if it is equal or not all in O(n) approach. then i told him O(log(n)) approach using binary search and then he was satisfied with answer.

then after, He told to reduce the complexity of searching in linked list by using any data structure or changing the node structure. at first i told him to use hash map but there can be duplicate data so he rejected this approach. Then after i was able to give 2 approaches .by using array of pointers which maintains middle element in every go of binary search and by using skip lists.

Round 4:

It started with exchanging introduction. and there was a discussion about major project of college in details. I was explaining my project on white board. He was asking a lot of details from my project or a lot of other questions like: what will you modify now in the project and why? What have you learnt through this project technically and non technically? and a lot of inner details of project.

then he asked to find the number of nodes in linked list which is outside of loop of linked list. He wanted to know the floyd algorithm and asked why it is correct and give arithmetical expression for this and then he asked to write code.

Again He asked question from linked list. There is a linked list having an extra pointer random pointer which points to any random node of linked list. And you have to clone the linked list. At first i was able to do it in O(n) space complexity but he asked for O(1) space complexity. then i was able to do it without using any extra space.


  1. Be confident and discuss the approach with interviewer.
  2. discuss about company at last with interviewer.
  3. do some problems from leetcode.
  4. last but not least don’t give up try the problems in all possible way. you will realize at last that you are able to do the problem and listen the interviewer carefully because he will give a lot of hints.

All The best.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!