Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Amazon Team. If you also belong to the team, you can get access from here

Amazon Verified Tick

Compare button icon Compare button icon Compare
4.1

based on 24.2k Reviews

Filter interviews by

Amazon SDE-2 Interview Questions, Process, and Tips

Updated 9 Dec 2024

Top Amazon SDE-2 Interview Questions and Answers

  • Q1. Ways To Make Coin Change You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ...read more
  • Q2. Median in a stream Given that integers are read from a data stream. Your task is to find the median of the elements read so far. Median is the middle value in an ordered ...read more
  • Q3. Shopping Options You are given the list of costs of pants in an array “pants”, shirts in an array “shirts”, shoes in an array “shoes”, and skirts in an array “skirts”. Yo ...read more
View all 45 questions

Amazon SDE-2 Interview Experiences

16 interviews found

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 2 Apr 2015

Interview Questionnaire 

10 Questions

  • Q1. Find sum of all numbers that are formed from root to leaf path (code) expected time complexity O(n)
  • Ans. 

    Find sum of all numbers formed from root to leaf path in a binary tree

    • Traverse the binary tree using DFS

    • At each leaf node, add the number formed from root to leaf path to a sum variable

    • Return the sum variable

    • Time complexity: O(n)

    • Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25

  • Answered by AI
  • Q2. Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them. For example : ABC -> A BC, AB C, ABC, A B C
  • Ans. 

    Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.

    • Use recursion to generate all possible combinations of spaces

    • For each recursive call, either add a space or don't add a space between the current character and the next character

    • Base case is when there are no more characters left to add spaces between

    • Time complexity is O(2^n) where n is the length of the string

  • Answered by AI
  • Q3. Preorder traversal without using recursion
  • Ans. 

    Preorder traversal without recursion

    • Use a stack to keep track of nodes

    • Push right child first and then left child onto stack

    • Pop top of stack and print value

    • Repeat until stack is empty

  • Answered by AI
  • Q4. There is a 12 km road and a contractor who is in-charge of repairing it. Contractor updates you about the work which is done in patches. Like “Road between 3.2 km to 7.9 km repaired ”, “Road between 1.21 k...
  • Ans. 

    Find longest continuous patch on a 12 km road with updates in patches

    • Maintain a variable to keep track of current patch length

    • Update the variable whenever a new patch is added

    • Maintain a variable to keep track of longest patch so far

    • Compare current patch length with longest patch length and update if necessary

    • Use a sorted data structure like a binary search tree to store the patches for efficient search

    • Time complexity: ...

  • Answered by AI
  • Q5. Several Questions were asked from my project
  • Q6. Find median of an unsorted array. (code
  • Ans. 

    Find median of an unsorted array.

    • Sort the array and find the middle element

    • Use quickselect algorithm to find the median in O(n) time

    • If the array is small, use brute force to find the median

  • Answered by AI
  • Q7. General discussion on heaps
  • Q8. A stream of characters is coming, at any moment you have to tell ‘k’ elements closest to a given number (code)
  • Ans. 

    Find 'k' elements closest to a given number from a stream of characters.

    • Use a priority queue to keep track of closest elements.

    • Update the queue as new characters come in.

    • Return the 'k' closest elements from the queue.

  • Answered by AI
  • Q9. Design data structure that supports insert(), remove(), find-max(), delete-max() operations. All operations should run in O(1) time. Lots of discussion was there, discussed many approaches.
  • Ans. 

    Design a data structure with O(1) insert, remove, find-max, and delete-max operations.

    • Use a doubly linked list to maintain the elements in sorted order.

    • Use a hash table to store the pointers to the nodes in the linked list.

    • Maintain a pointer to the maximum element in the hash table.

    • Update the pointers in the hash table when inserting or removing elements.

    • Update the maximum pointer when deleting or inserting the maximum

  • Answered by AI
  • Q10. Check whether given link list represents palindrome
  • Ans. 

    Check if a given linked list is a palindrome.

    • Traverse the linked list and store the values in an array.

    • Compare the first and last elements of the array, then move towards the center.

    • If all elements match, the linked list is a palindrome.

    • Alternatively, use two pointers to find the middle of the linked list and reverse the second half.

    • Compare the first half with the reversed second half to check for a palindrome.

  • Answered by AI

Interview Preparation Tips

Round: Technical Interview
Experience: Recently I attended Amazon Bangalore interview for SDE 2 position. All f2f and no phone/written screening as I had attended one before and cleared those. Total 4 rounds wer der. The first techh round dey asked mi questions listed above.
Tips: NA

Round: Technical Interview
Experience: ROUND 2 dey asked mi above questions
Tips: NA

Round: Technical Interview
Experience: Round 3 Above questions wer asked.

Round: Technical Interview
Experience: This was the last round. thy asked mi above questions

College Name: NA

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 9 Dec 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Hacker Rank test - 4 rounds (Coding, System Design and Work style assessment, Leadership Principles)

Round 2 - Technical 

(2 Questions)

  • Q1. LC - 2 medium difficulty questions
  • Q2. System design discussion

SDE-2 Interview Questions Asked at Other Companies

asked in Walmart
Q1. Maximum Frequency NumberNinja is given an array of integers that ... read more
asked in Atlassian
Q2. K Most Frequent WordsYou have been given an array/list 'WORDS' of ... read more
Q3. Design Question“Rent a Ride”  As a customer to Rent a Ride y ... read more
Q4. Reverse StringYou are given a string ‘S’. You are also given ‘M’ ... read more
asked in ShareChat
Q5. Find Square root of an integerYou are given an integer ‘A’. Your ... read more

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 3 Sep 2024

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
4-6 weeks
Result
Not Selected

I applied via Company Website and was interviewed in Mar 2024. There were 2 interview rounds.

Round 1 - Coding Test 

Amazon Online assessment which consisted of 2 coding DSA medium question

Round 2 - One-on-one 

(3 Questions)

  • Q1. Question related to TreeMap
  • Q2. Question related BFS
  • Q3. System Design - Design Feed system

Interview Preparation Tips

Interview preparation tips for other job seekers - Be ready to answer questions in 25 minuted both coding and system design

What people are saying about Amazon

View All
mytomato
Verified Icon
2w
works at
Amazon
Are you satisfied with your job
Yes
0%
No
0%
8 participants . poll closed
Got a question about Amazon?
Ask anonymously on communities.

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 6 Jul 2022

Round 1 - Coding Test 

Diameter of a binary tree and bfs and dfs questions

Round 2 - Coding Test 

Data structure and algorithms

Round 3 - Technical 

(1 Question)

  • Q1. System design questions

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare data structure well and system design

Amazon interview questions for designations

 SDE

 (43)

 SDE Intern

 (16)

 SDE-1 Position

 (2)

 Sdet 2

 (1)

 SDE (Software Development Engineer)

 (26)

 HR Associate 2

 (3)

 Finance Specialist 2

 (1)

 Application Engineer 2

 (1)

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 18 Apr 2022

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - One-on-one 

(1 Question)

  • Q1. Behavioural questions related to leadership principle.

Interview Preparation Tips

Interview preparation tips for other job seekers - Nothing specific, respond back based on your experience

Get interview-ready with Top Amazon Interview Questions

SDE-2 Interview Questions & Answers

user image CodingNinjas

posted on 16 Sep 2021

I was interviewed in Apr 2021.

Round 1 - Video Call 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Medium

Timing: 10AM-11AM
Interviewer was quite supportive and helpful.
Environment was normal as usual and it was morning time

  • Q1. Application Question

    Design a system where user can upload, delete and share the video/image files. 
    And can immediately view the uploaded files on the different logged-in system

Round 2 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

Timing: 11AM-12PM
The interviewer was SDE2
He was checking the code for edge cases and was hinting if required

  • Q1. Implement a priority queue

    Ninja is given a task to implement a priority queue using Heap data structure. The Ninja is busying preparing for the tournament., So he asked for your help.

    Your task is to us...

  • Ans. Array representation of heap

     

    1. Since the heap is maintained in the form of a complete binary tree, the heap can be easily represented in the form of an array.
    2. To keep the tree complete and shallow, while inserting a new element insert it in the leftmost vacant position in the last level i.e., at the end of our array, and perform some operation to maintain the property of the heap.
    3. Similarly, for deleting the maximum e...
  • Answered by CodingNinjas
  • Q2. Ninja and the bulbs

    Ninja owns an electronic shop. In the shop, Ninja has 'N' bulbs. To sell these bulbs, Ninja has to check if they are of good quality. To check bulbs, Ninja uses a unique techniq...

  • Ans.  Brute Force

    Approach:

    A brute force solution to this problem is to turn on and off the bulbs N time, then at last check the number of bulbs that are on.


     

    Algorithm:

    • Take a boolean array of ‘BULBS’ of size N+1.
    • Itertate on ‘i’ from 1 to ‘N’
      • Iterate on ‘j’ form ‘i’ to ‘N’ and each time increment ‘j’ as ‘j’ += ‘i’.
        • if(BULBS[j] == true) then make it false.
        • If (BULBS[j]==false) then make it true.
    • Intialise a variable ‘COUNT’ =...

  • Answered by CodingNinjas
Round 3 - Video Call 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Medium

Timing: 6PM-7PM
The interviewer was not interactive and didn't gave any feedback whatsoever.
It was Hiring Manager Round
Interviewer was Software Development Manager at Amazon

  • Q1. Maximize the sum

    You are given two sorted arrays of distinct integers, ‘ARR1’ and ‘ARR2’. If you find a common element in both arrays, you can switch from one array to another.

    Your task is to find a pat...

  • Ans. Recursive

    In this problem, our primary focus is on the common elements i.e. an element that is present in both the arrays. Then, we have to decide whether we have to make a switch. So for that, first we store all the elements of ‘ARR1’ and ‘ARR2’ into ‘MAP1’ and ‘MAP2’ respectively. 

     

    Now we call our ‘maximiseSumHelper’ function. We call this function for both cases i.e starting with ‘ARR1’ and starting with ‘A...

  • Answered by CodingNinjas

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from A. C. Patil College of Engineering. I applied for the job as SDE - 2 in BangaloreEligibility criteriaAbove 2 years of experienceAmazon interview preparation:Topics to prepare for the interview - Linkedlist, BST, Heap, Queue, Pointers, Binary SearchTime required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Tip 1 : Focus on internals of Data structure on how it actually works
Tip 2 : Implement the Data Structure from scratch, later you can use the inbuilt packages no problem but you must know the implementation
Tip 3 : Understand System Design concepts

Application resume tips for other job seekers

Tip 1 : Highlight your contributions you made and how it impacted the business and be real
Tip 2 : Mention the improvement figures like x% reduction in page load size, improved SEO ranking by x figure, reduce memory usage by y%

Final outcome of the interviewRejected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image CodingNinjas

posted on 16 Sep 2021

I was interviewed in Apr 2021.

Round 1 - Telephonic Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Easy

Started with brief intro(5 mins) about interviewer.
Problem solving question, question was already there in the codelink shared by the interviewer. He explained the problem again with sample testcase. 
The Interviewer was friendly.

  • Q1. Course Schedule II

    You have been given ‘N’ courses and some courses may have prerequisites. Now consider a matrix ‘PREREQUISITES’ of size 'M' x 2 which represents that you must complete course '...

  • Ans. Breadth-First Search

    Our current algorithm is based on the idea of the BFS approach. We first process all the courses with 0 in-degree implying no prerequisite courses required. If we remove all these courses from the graph, along with their outgoing edges, we can find out the courses/nodes that should be processed next. These would again be the nodes with 0 in-degree. We can continuously do this until all the courses h...

  • Answered by CodingNinjas
  • Q2. System Design

    System design a live video broadcast platform.

Round 2 - Video Call 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Medium

There were 2 interviewers(India HM and Seattle HM), India HM was just shadowing and didn't ask any questions. Started with intro, he asked in detail about what I do at current company(10 mins). Again, jumped into LP's(25 mins).

  • Q1. Distance between two nodes of a Tree

    Given a binary tree and the value of two nodes, find the distance between the given two nodes of the Binary Tree.

    Distance between two nodes is defined as the minimum...

  • Ans. Naive Approach

    In any rooted tree, the distance between two nodes 'U' and 'V' can be found by finding the lowest common ancestor (LCA), ‘x’ of two nodes. The lowest common ancestor (LCA) between nodes 'U' and 'V' is defined as the lowest node in the tree that has both 'U' and 'V' as descendants, where we define each node to be a descendant of itself (so if 'U' has a direct connection from 'V', 'V' is the lowest common a...

  • Answered by CodingNinjas
  • Q2. Median in a stream

    Given that integers are read from a data stream. Your task is to find the median of the elements read so far.

    Median is the middle value in an ordered integer list. If the size of the ...

  • Ans. Brute force approach

    Store the incoming data elements in a vector. Sort the vector everytime you need to output the median.

    Algorithm:

    1. Store the incoming elements of the data stream in a vector.
    2. Step by step insert one element and sort the vector as soon as any element is added in the vector.
    3. If the size of the vector is odd, print the middle element of the sorted vector.
      If the size of the vector is even, return the mean of...
  • Answered by CodingNinjas
Round 3 - Telephonic Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

There was only 1 interviewer in this round and We had no video sharing in this round so it was becoming difficult to understand each other.

  • Q1. Object Oriented Design Question

    Started with brief intro about both(5 mins), then he jumped into LP's(25 mins). This was very difficult since there was no video and he was grilling me real hard on this, so...

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in SeattleEligibility criteriaNAAmazon interview preparation:Topics to prepare for the interview - Data Structures - Trie, HashMap, Sets, Priority Queue, Stack, Advanced Topics like Fenwick Tree, Segment Trees, Game Theory, Dynamic Programming, Union Find,Graph Algorithms, BitmaskingTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Bookmark the GFG Amazon Archives. It helped me a lot during my preparations. Reading other’s interview experiences is one of the best ways to get yourselves ready for the next job interview. Practice daily atleast 5 questions.
Tip 2 : Most commonly asked topics in Amazon Interviews ( as per the mail I received from my recruiter ) :
BFS/DFS/Flood fill, Binary Search, Tree traversals, Hash tables, Linked list, stacks, queues, two pointers/sliding window
Binary heaps, Ad hoc/string manipulations.
Tip 3 : Highly recommended sites for practicing questions ( usually practice medium and hard level questions) :
Leetcode (highly encouraged)
Geeksforgeeks (highly encouraged)
CodeZen( highly encouraged)
Codeforces
Tip 4 : This is a great bigocheatsheet that could be of great help https://www.bigocheatsheet.com/

Application resume tips for other job seekers

Tip 1 : Mention past working experience in detail as how you were important to your previous company.
Tip 2 : Try to keep your resume to 1 page if work experience < 5 years
Tip 3 : Update your resume according to role you are applying for and never put false things on resume.

Final outcome of the interviewRejected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image CodingNinjas

posted on 16 Sep 2021

I was interviewed in Mar 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

This round was scheduled in the evening hours and all the participants were required to fill a form which was shared 15 minutes prior to the start of the online coding round. This form was filled out probably for the security reasons and to ensure that no one disinterested participant gives the test.

  • Q1. Ways To Make Coin Change

    You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a cha...

  • Ans. Recursion

     

    1. The idea is to use recursion.
    2. For a particular coin, we have two options either include it or exclude it.
    3. If we include that coin, then calculate the remaining number that we have to generate so recur for that remaining number.
    4. If we exclude that coin, then recur for the same amount that we have to make.
    5. Our final answer would be the total number of ways either by including or excluding.
    6. There will be two edg...
  • Answered by CodingNinjas
  • Q2. Validate BST

    You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.

    A binary search tree (BST) is a binary tr...

  • Ans. BST property

    The approach is based on the fact that the value of each node in a BST is greater than the value of all the nodes in the left subtree and smaller than the value of all the nodes in the right subtree.

     

    Here is the complete algorithm-

    • For each node, we store the minimum and maximum value allowed for that node. Initially, for the root node, the minimum value would be -10^9 and the maximum value should be 10...
  • Answered by CodingNinjas
Round 2 - Telephonic Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Hard

This round was on call where I was just supposed to answer the tech questions that were asked. It started with a brief interview with one another and then moved to questions on DBMS, operating systems, computer networks and all. Almost 20-25 questions were asked and I probably answered 90% of them correctly.

  • Q1. Reverse Linked List
    Input Format :
    The first line of input contains a single integ...
  • Ans. Recursive Approach

    One way is to use recursion to reverse the list. Divide the linked list in two halves, the first node and the rest of the list. Reverse the second half using recursion and append the first half, that is the first node at the end of the reversed linked list. Return the head of the reversed linked list.

     

    Algorithm

     

    • If the list contains only one node, return the head of the list.
    • Else, divide the ...
  • Answered by CodingNinjas
Round 3 - HR 

(1 Question)

Round duration - 30 minutes
Round difficulty - Hard

There was only one interviewer for this round. He continuously interacted with me and was giving me some good situational problems that were not very easy to answer. Basically those were open-minded questions which can be answered oth ways and that's why I found it quiet hard as per my nature but at the end things went well for me.

  • Q1. Basic Puzzles

    A noticeable aspect in this puzzles is the fact that there’s a circular misplacement, which implies if apple is wrongly labelled as Apple, Apple can’t be labelled as Orange, i.e., it has to be...

  • Ans. 

    Note: basically it's better if you have seen some puzzles before any HR round since they will give you an idea of what kind of problem you may encounter and then you can ace any difficult to difficult HR interview.

  • Answered by CodingNinjas

Interview Preparation Tips

Professional and academic backgroundI completed Mechanical Engineering from Malaviya National Institute of Technology Jaipur. I applied for the job as SDE - 2 in HyderabadEligibility criteriaabove 7 cgpa, no backlogsAmazon interview preparation:Topics to prepare for the interview - Data Structures, hashmap, linked list, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, array, 2-pointer problemsTime required to prepare for the interview - 8 monthsInterview preparation tips for other job seekers

Tip 1 : practice on gfg and coding ninjas
Tip 2 : compete on codechef and codeforces
Tip 3 : learn DSA and practice regularly

Application resume tips for other job seekers

Tip 1 : put your entire valuable experience in brief
Tip 2 : put the handle of you competitive coding profiles
Tip 3 : try to put those things that really attracts the recruiter, will be better if your past experiences relates to the company

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 interview

user image Rachit Jain

posted on 16 Nov 2021

SDE-2 Interview Questions & Answers

user image CodingNinjas

posted on 16 Sep 2021

I was interviewed in Oct 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Easy

I got a call from an Amazon recruiter regarding the schedule of the test . She sent me the coding test link which I had to complete within a week. we can attempt the online test anytime, when we have time for a period of 90 minutes at a stretch.Once I completed the test, I got a call to schedule the interviews in two weeks.

  • Q1. Shopping Options

    You are given the list of costs of pants in an array “pants”, shirts in an array “shirts”, shoes in an array “shoes”, and skirts in an array “skirts”. You are also given a budget amount ‘X...

  • Ans. Brute Force

    We can check all possible combinations to buy items. That can be done by maintaining a variable “answer” and iterating over all four lists in a nested way such that each pant, shirt, shoe, and skirt pair can get selected and find the sum of that pair. If sum is less than or equal to budget then increment “answer” by one. Return the “answer”.


    Algorithm:

     

    • Create an integer “answer” equal to 0.
    • First iterate ...

  • Answered by CodingNinjas
  • Q2. Max Submatrix

    Ninja has been given a matrix ‘MAT’ of integers having size ‘N’ x ‘M’ i.e. N rows and M columns. Ninja has to find the maximum sum submatrix in it. In other words, he has to find the maximum ...

  • Ans. Brute Force

    The brute force approach is we check for every possible submatrix in the given ‘MAT’.

    • 4 nested loops are required to select every submatrix of the matrix.
    • 2 nested loops are required to take the sum of all the elements of the submatrix.

    Here is the algorithm :

    1. We declare a variable ‘MAX_SUM’ in which we store the maximum sum over all submatrices in the matrix.
    2. We run a loop for ‘i’ = 0 to ‘N’:
      • We run a loop for ‘j...
  • Answered by CodingNinjas
Round 2 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Virtual interview occured in amazon chime.The interviewer gave his introduction, asked me a bit on the kind of projects I’ve worked on. Then he started with a data structure problem.

  • Q1. Clone a binary tree with random pointers.

    You are given a binary tree. Apart from the left and right child pointers, each node in the given binary tree points to a random node in the given binary tree. You...

  • Ans. HashMap based approach

    The idea is to use a HashMap to map the tree nodes to each clone node. We will traverse the binary tree and create a clone tree with the random pointer equal to NULL and map each node of the given tree to its clone node. Now we will again iterate through the tree and add the random pointer of each node by looking up the HashMap. 

     

    The steps are as follows:

    1. Let’s define a HashMap to map eac...
  • Answered by CodingNinjas
  • Q2. Ninja Port

    Ninja is stuck in a city with ‘N’ colonies, and each colony contains ‘K’ houses. Ninja is currently at the house number “sourceHouse” present in the colony with colony number “sourceColony”. He ...

  • Ans. Breadth First Search

    We can initially create a graph with 2 nodes from each colony i.e. the first and last house of each colony would be included in the graph. We also create an edge from the node representing the last node of each colony to the node representing the first node of the next colony, and vice versa.
     

    Now, we add into the graph each house that has an outgoing or incoming secret path. We also make edges ...

  • Answered by CodingNinjas
Round 3 - Video Call 

(1 Question)

Round duration - 75 Minutes
Round difficulty - Easy

This was taken by an engineering manager who asked me regarding my projects for around 10-15 mins and then we moved to a system design problem. He asked me to design Slack messenger.
I started by listing the functional and non-functional requirements(on which he questioned me a bit), then I moved to draw the high-level architecture. The components which I drew were the clients, gateway service(LB + authentication, etc), Messaging Service, User Service, Web Socket Manager service, Fan Out service(I added this for the group messages thing, but he didn’t interrogate much on that).

He asked me what would be the schema of my messages table and the scenarios in which the recipient user is online/offline.Also asked about the partitioning key and primary key of the 2-3 tables which I had made

  • Q1. Technical Questions

    This was taken by an SDE III guy, who again asked me about my projects for like 10 mins and then moved on to a low level design question.He asked me to design the HackerRank platform.
    Aga...

Round 4 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Hard

BarRaiser Round

This was again taken by an engineering manager who discussed my projects in depth for around 20-25 mins. In the remaining time he asked me 2 dsa questions. (Yes I too was surprised that he didn’t ask anything regarding design).

In almost all the rounds, I was asked questions related to Amazon Leadership principles, so do make sure you go through those before sitting for the interview process. You can refer to this link(https://www.codingninjas.com/codestudio/problem-lists/top-amazon-coding-interview-questions) for practicing the same, I found it useful. 
In the design rounds, interviewer doesn’t expect the most ideal answer from you and unless your choice of technology is outrageously wrong, he won’t pinpoint that.

  • Q1. Group Anagrams Together

    You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are a...

  • Ans. Sorting based Approach

    The idea behind this approach is that two or more than two strings are anagrams if and only if their sorted strings are equal. So we will use a HashMap, let’s say “anagramGroup”, where each key is a sorted string, and the key will be mapping to the list of indices from the given list of strings that form a group of anagrams. This means that if we sort the strings at those indices, we will get the ...

  • Answered by CodingNinjas
  • Q2. Add Linked Lists

    Given two numbers represented by linked lists. Your task is find the sum list and return the head of the sum list.

    The sum list is a linked list representation of addition of two numbers...

  • Ans. Recursive approach

    One way is to recursively add the two linked lists. Keep the nodes in the recursion stack and add the last nodes first and then second last and so on. Initially, find the size of both the linked lists. If both the linked lists are of the same size, add them using recursion. Else if their sizes differ, move the head pointer of the larger linked list forward K times, where K is the difference between th...

  • Answered by CodingNinjas

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from Sathyabama Institute Of Science And Technology. I applied for the job as SDE - 2 in HyderabadEligibility criteriaNo CGPA criteriaAmazon interview preparation:Topics to prepare for the interview - Data Structures and Algorithms, OOPS concepts, cpp, operating systems, dbmsTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Expect questions related to Amazon Leadership principles in all rounds, so go through those thoroughly before sitting for the interview process.
Tip 2 : In the design rounds, interviewer doesn’t expect the most ideal answer from you and unless your choice of technology is outrageously wrong, he won’t pinpoint that.
Tip 3 : Data Structures questions are a must in all rounds, so try to master them thoroughly

Application resume tips for other job seekers

Tip 1 : Make sure you know everything you mention in your resume
Tip 2 : Have some hands on with hackathons and contests ,which brings an added value to your resume

Final outcome of the interviewRejected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image CodingNinjas

posted on 16 Sep 2021

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Medium

  • Q1. Number of Islands

    You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

    A cell is said to be connected...

  • Ans. 

    I used DFS to find number of distinct components.

  • Answered by CodingNinjas
  • Q2. Add First and Second Half

    You are given a Singly Linked List of N nodes such that each node represents a single digit.

    Your task is to return a node 'X', where 'X' represents the head of...

  • Ans. Brute Force

    In this approach, we will first iterate through the Linked List and find the length of the given Linked List. Then we will initialize two Linked List ‘HEAD1’ and ‘HEAD2’ to store the two numbers.

     

    We will iterate on the Linked List till half-length and create a new list to store the first half with a head equal to ‘HEAD1’. Similarly, we will keep the second half in a new list with a head equals to ‘HEAD2...

  • Answered by CodingNinjas
Round 2 - Video Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

  • Q1. Next greater element

    You are given an array arr of length N. You have to return a list of integers containing the NGE(next greater element) of each element of the given array. The NGE for an element X is t...

  • Ans. Brute Force
    1. Initialise an array ans of length N to store the next greater number of arr[i] at index i.
    2. Traverse the given array and for every element at index I
      • Initialise a variable next to -1.
      • Run a loop from i+1 to N, and check whether the current element is greater than arr[i] then update the next to the current element and break the loop.
      • Store next at ans[i].
    3. Return ans array.
    Space Complexity: O(1)Explanation:

    O(1).

    &nb...

  • Answered by CodingNinjas
Round 3 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Hard

  • Q1. Word Break

    You are given a non-empty string containing no spaces (say sentence) and a dictionary of list of non-empty strings (say the list of words). You are supposed to construct and return all possible...

  • Ans. 

    Paraphrasing the solution in my words

    Let's take an example. s="catsand" and wordDict = ["cat", "cats", "and", "sand"].

    The solution starts by taking the string S( "catsand") initially finding whether whole string is present or not . IN this case it is not present in the dict.

    Now breaking the string and then finding
    s.substr( i) gives the substring from ith index till the end. so string word goes as

    atsand // not present
    ts...

  • Answered by CodingNinjas
  • Q2. Valid Parenthesis

    You're given string ‘STR’ consisting solely of “{“, “}”, “(“, “)”, “[“ and “]” . Determine whether the parentheses are balanced.

    Input Format:
    The first line contains an Integer &...
  • Ans. Valid Parenthesis

    Make use of the stack. Traverse the string and push the current character in the stack if it is an opening brace else pop from the stack If it is the corresponding starting brace for current closing brace then move to the next character of the string otherwise return false.

     

    If after complete traversal if the stack is empty then the string is balanced else it is not balanced.

     

    Pseudo Code:

    • Decla...
  • Answered by CodingNinjas
Round 4 - Video Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Easy

  • Q1. System Design

    Design a local transport system like BMTC.

Round 5 - Video Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Easy

  • Q1. Project Questions

    It was mix of HLD, LLD design discussion of your project. Make sure you know enough about your projects. Questions asked were based on Amazon leadership principles. Amazon mainly focuses o...

  • Ans. 

    Tip 1: Revolve your answers around amazon leadership principles.
    Tip 2: Make sure you do have good knowledge of your projects.

  • Answered by CodingNinjas

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteriaNAAmazon interview preparation:Topics to prepare for the interview - Graph , Dynamic Programming, Array, String, System DesignTime required to prepare for the interview - 2 monthsInterview preparation tips for other job seekers

Tip 1 : Practice a lot.
Tip 2 : Focus on system design 
Tip 3 : Focus on amazon Leadership principles.

Application resume tips for other job seekers

Tip 1: Mention relevant details for job you are applying. 
Tip 2: Be objective and concise.

Final outcome of the interviewRejected

Skills evaluated in this interview

Amazon Interview FAQs

How many rounds are there in Amazon SDE-2 interview?
Amazon interview process usually has 2-3 rounds. The most common rounds in the Amazon interview process are Coding Test, Technical and One-on-one Round.
What are the top questions asked in Amazon SDE-2 interview?

Some of the top questions asked at the Amazon SDE-2 interview -

  1. There is a 12 km road and a contractor who is in-charge of repairing it. Contra...read more
  2. Given a string you need to print all possible strings that can be made by placi...read more
  3. Design data structure that supports insert(), remove(), find-max(), delete-max(...read more

Tell us how to improve this page.

People are getting interviews through

based on 2 Amazon interviews
Company Website
50%
50% candidates got the interview through other sources.
Moderate Confidence
?
Moderate Confidence means the data is based on a sufficient number of responses received from the candidates

SDE-2 Interview Questions from Similar Companies

Flipkart SDE-2 Interview Questions
4.0
 • 5 Interviews
Uber SDE-2 Interview Questions
4.2
 • 2 Interviews
Paytm SDE-2 Interview Questions
3.3
 • 1 Interview
OLX SDE-2 Interview Questions
3.8
 • 1 Interview
View all
Amazon SDE-2 Salary
based on 306 salaries
₹24.2 L/yr - ₹80 L/yr
59% more than the average SDE-2 Salary in India
View more details

Amazon SDE-2 Reviews and Ratings

based on 18 reviews

2.8/5

Rating in categories

3.0

Skill development

2.2

Work-Life balance

3.3

Salary & Benefits

2.3

Job Security

2.4

Company culture

2.8

Promotions/Appraisal

2.5

Work Satisfaction

Explore 18 Reviews and Ratings
Customer Service Associate
4.1k salaries
unlock blur

₹0.6 L/yr - ₹6 L/yr

Transaction Risk Investigator
3.1k salaries
unlock blur

₹2.5 L/yr - ₹6.5 L/yr

Associate
2.8k salaries
unlock blur

₹0.8 L/yr - ₹6.7 L/yr

Senior Associate
2.4k salaries
unlock blur

₹2 L/yr - ₹10.1 L/yr

Program Manager
2k salaries
unlock blur

₹9 L/yr - ₹36 L/yr

Explore more salaries
Compare Amazon with

Flipkart

4.0
Compare

TCS

3.7
Compare

Google

4.4
Compare

Netflix

4.5
Compare

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Did you find this page helpful?
Yes No
write
Share an Interview