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

Filter interviews by

Amazon SDE Interview Questions and Answers

Updated 12 Jan 2025

52 Interview questions

A SDE was asked
Q. Given two linked lists, one input and one output, identify the pattern between them and code the logic. The problem involves reversing the two halves of a linked list.
Ans. 

Reversing two halves of a linked list problem

  • Identify input and output linked lists

  • Reverse the two halves of the input linked list

  • Compare the reversed input linked list with the output linked list

  • If they match, return true else false

A SDE was asked
Q. Given a number of pairs of parentheses, find all possible valid and unique combinations without any duplicates. Write code to generate these combinations.
Ans. 

Find total possible valid unique combinations of given number of pairs of parenthesis without duplicity.

  • Use recursion to generate all possible combinations

  • Check for validity of each combination using a stack

  • Use a set to avoid duplicity

SDE Interview Questions Asked at Other Companies

asked in Infosys
Q1. Return Subsets Sum to K Problem Statement Given an integer array ... read more
asked in Nagarro
Q2. Partition to K Equal Sum Subsets Problem Given an array of intege ... read more
asked in Nagarro
Q3. Sort a "K" Sorted Doubly Linked List Given a doubly-linked list w ... read more
asked in Amazon
Q4. Describe a scenario where you were given updates on repaired road ... read more
asked in Nagarro
Q5. Maximum Meetings Selection You are tasked with scheduling meeting ... read more
A SDE was asked
Q. Given an in-order traversal of a special binary tree having the property that the node is always greater than its left and right child, construct the tree and write code.
Ans. 

Construct a binary tree from in-order traversal with nodes greater than left and right child.

  • The root node will be the maximum value in the in-order traversal

  • Recursively construct the left and right subtrees using the left and right portions of the in-order traversal

  • Repeat until all nodes are added to the tree

A SDE was asked
Q. Describe an algorithm to find the top 10 trending words inserted by users on sites like Twitter.
Ans. 

An algorithm to find top 10 trending words inserted by users in sites like Twitter.

  • Collect a large dataset of tweets

  • Tokenize the tweets into individual words

  • Remove stop words and punctuation

  • Count the frequency of each word

  • Sort the words by frequency in descending order

  • Select the top 10 words

What people are saying about Amazon

View All
an influencer marketing manager
2w
Should she delete her LinkedIn post or not?
Asking for a friend, Since last 3 months, she has been facing multiple issues including mental harassment by her manager at her workplace. She tried all official channels including reporting to the HR and even to the CEO eventually, but surprisingly, nothing happened. Infact, as a retaliation, she was put on PIP last month by here manager. So finally as a response to this continuous harassment, she went to LinkedIn and called out her manager, the company and even the CEO. And this is what she has received in response! The company is threatening her of legal actions and now we are confused, whether to delete the posts or to maintain our stand. Any help would be highly recommended at this point!
FeedCard Image
Got a question about Amazon?
Ask anonymously on communities.
A SDE was asked
Q. Find the first occurrence of 1 in a sorted infinite binary array.
Ans. 

Find the first occurrence of 1 in a sorted infinite binary tree.

  • Use binary search to traverse the tree.

  • If the current node is 1, check if its left child is also 1. If yes, move to the left subtree, else return the current node.

  • If the current node is 0, move to the right subtree.

  • Repeat until the first occurrence of 1 is found or the tree is exhausted.

A SDE was asked
Q. How can you remove duplicates from a string in O(n) time complexity without using a hash table?
Ans. 

Remove duplicates from a string in O(n) without using hash

  • Use an array of boolean values to keep track of characters already seen

  • Iterate through the string and mark characters as seen in the array

  • If a character has already been seen, remove it from the string

A SDE was asked
Q. Write an efficient code to find the first occurrence of 1 in a sorted binary array.
Ans. 

Find the first occurrence of 1 in a sorted binary array.

  • Use binary search to find the first occurrence of 1.

  • If the mid element is 1, check if it's the first occurrence or if the element before it is 0.

  • If the mid element is 0, search in the right half of the array.

  • If the mid element is 1 and the element before it is also 1, search in the left half of the array.

Are these interview questions helpful?
A SDE was asked
Q. In a binary tree, each node has a random pointer. If this pointer points to a node that is not a successor, set it to NULL. Otherwise, leave it untouched. Write code to implement this.
Ans. 

Modify a binary tree's random pointers to point to NULL if they don't point to a successor node.

  • Traverse the binary tree using DFS or BFS.

  • For each node, check if the random pointer points to a valid successor.

  • If it points to a node that is not a successor, set it to NULL.

  • A successor of a node is defined as its children or their descendants.

A SDE was asked
Q. Given a tree, populate the sibling of each tree node with the next node at the same level. The space complexity should be O(1).
Ans. 

Populate sibling of a tree node with next node in same level with O(1) space complexity.

  • Traverse the tree level by level using BFS.

  • For each node, check if it has a sibling to its right.

  • If yes, populate the sibling pointer of the current node with the right sibling.

  • If no, move to the next level.

  • Repeat until all levels are traversed.

A SDE was asked
Q. Given a tree, construct its mirror tree and return the root of the mirror tree.
Ans. 

Construct a mirror tree from a given tree and return the root of the mirror tree.

  • Traverse the given tree in a recursive manner.

  • Swap the left and right child of each node.

  • Return the root of the mirror tree.

Amazon SDE Interview Experiences

44 interviews found

SDE Interview Questions & Answers

user image Anonymous

posted on 12 Jan 2025

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

I applied via Referral and was interviewed in Dec 2024. There were 2 interview rounds.

Round 1 - Coding Test 

OA consisted of two DSA questions.

Round 2 - Technical 

(1 Question)

  • Q1. Was asked dsa based questions.

SDE Interview Questions & Answers

user image Vijayalakshmi Chidambaram

posted on 21 Nov 2024

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. General behavioral kinda questions on my last project
  • Q2. LLD question where coding in 30 mins

SDE Interview Questions & Answers

user image Anonymous

posted on 9 Dec 2024

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
-
Result
Selected Selected

I applied via LinkedIn and was interviewed in Nov 2024. There were 3 interview rounds.

Round 1 - Aptitude Test 

Simple Normal DSA Question

Round 2 - Coding Test 

Focus on DSA and optimization

Round 3 - Coding Test 

Project Discussion and some Date structure questions

Interview Preparation Tips

Interview preparation tips for other job seekers - It was normal simple

SDE Interview Questions & Answers

user image Anonymous

posted on 12 Jan 2025

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

Good DSA Questions
Recursion, Graph and Tree

SDE Interview Questions & Answers

user image Anonymous

posted on 12 Sep 2024

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
-
Result
No response

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

Round 1 - Technical 

(2 Questions)

  • Q1. String pattern matching
  • Q2. Behavioral questions
Round 2 - Technical 

(2 Questions)

  • Q1. Behavioral questions
  • Q2. BFS file system

SDE Interview Questions & Answers

user image Anonymous

posted on 31 Dec 2024

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

There are two straightforward data structure and algorithm questions, while the others primarily consist of multiple-choice questions, mostly focusing on nodes and Python.

Round 2 - Coding Test 

In the telephonic round, they primarily assess your problem-solving skills. The interviewer asked me a binary search question, which I was able to solve, but it took me a considerable amount of time to arrive at the solution. This was likely the main reason for my rejection.

SDE Interview Questions & Answers

user image Aryan Verma

posted on 28 Oct 2024

Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Naukri.com and was interviewed in Sep 2024. There was 1 interview round.

Round 1 - Aptitude Test 

Find the order of excecution in sql

Interview Preparation Tips

Interview preparation tips for other job seekers - nothing as such go with the flow....

SDE Interview Questions & Answers

user image Yatharth Singh

posted on 5 Dec 2024

Interview experience
3
Average
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via LinkedIn and was interviewed in Nov 2024. There was 1 interview round.

Round 1 - Coding Test 

It was a one hour DS Algo Round based on recursion and DP. I managed to get to the logic for the problem but couldn't execute compltely due to time constraints

SDE Interview Questions & Answers

user image Anonymous

posted on 29 Jun 2024

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Naukri.com and was interviewed in May 2024. There were 2 interview rounds.

Round 1 - Coding Test 

HACKER RANK TEST WITH MEDIUM LEVEL QUESTIONS

Round 2 - Technical 

(3 Questions)

  • Q1. CREATE A LINKED LIST
  • Ans. 

    A linked list is a data structure consisting of nodes where each node points to the next node in the sequence.

    • Create a Node class with data and next pointer

    • Initialize a head pointer to null

    • Add nodes by updating next pointers

  • Answered by AI
  • Q2. FIND THE LOOP IN LINKED LIST
  • Ans. 

    To find a loop in a linked list, use Floyd's Tortoise and Hare algorithm.

    • Use two pointers, slow and fast, to traverse the linked list.

    • If there is a loop, the two pointers will eventually meet at the same node.

    • To find the start of the loop, reset one pointer to the head and move both pointers at the same pace.

  • Answered by AI
  • Q3. QUESTION BASED ON DYNAMIC PROGRAMMING

Interview Preparation Tips

Topics to prepare for Amazon SDE interview:
  • Data Structures
  • Algorithms
  • Java
Interview preparation tips for other job seekers - PREPARE WELL ON DATA STRUCTURES AND ALGORITHMS

Skills evaluated in this interview

SDE Interview Questions & Answers

user image Anonymous

posted on 24 Aug 2024

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Company Website and was interviewed in Jul 2024. There were 5 interview rounds.

Round 1 - Coding Test 

SLiding window problem

Round 2 - Coding Test 

Tree problem variation

Round 3 - Coding Test 

DP Problems same questions but with different cases

Round 4 - HR 

(2 Questions)

  • Q1. Experience with last company
  • Ans. 

    I worked at a tech startup where I developed web applications and implemented new features.

    • Led a team of developers to successfully launch a new mobile app

    • Implemented a new payment gateway system to improve user experience

    • Collaborated with product managers to prioritize and deliver features on time

  • Answered by AI
  • Q2. How you handle pressure
  • Ans. 

    I handle pressure by staying organized, prioritizing tasks, and taking breaks when needed.

    • I prioritize tasks based on deadlines and importance

    • I break down large tasks into smaller, manageable steps

    • I communicate with team members or supervisors if feeling overwhelmed

    • I practice mindfulness techniques like deep breathing or meditation to stay calm

  • Answered by AI
Round 5 - Behavioral 

(1 Question)

  • Q1. Behavioural ROund

Amazon Interview FAQs

How many rounds are there in Amazon SDE interview?
Amazon interview process usually has 2-3 rounds. The most common rounds in the Amazon interview process are Coding Test, Technical and Resume Shortlist.
How to prepare for Amazon SDE interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Amazon. The most common topics and skills that interviewers at Amazon expect are Clinical SAS Programming, Architectural Design, C++, Computer Science and Analytical Chemistry.
What are the top questions asked in Amazon SDE interview?

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

  1. There is a 12 km road and a contractor who is in-charge of repairing it. Contra...read more
  2. There are n nuts and n bolts represented in two different arrays and a function...read more
  3. Basically it was from snakes and ladders game. There is n x n matrix and you ar...read more
How long is the Amazon SDE interview process?

The duration of Amazon SDE interview process can vary, but typically it takes about less than 2 weeks to complete.

Tell us how to improve this page.

Overall Interview Experience Rating

4.5/5

based on 35 interview experiences

Difficulty level

Easy 16%
Moderate 74%
Hard 11%

Duration

Less than 2 weeks 59%
2-4 weeks 29%
4-6 weeks 6%
6-8 weeks 6%
View more

Interview Questions from Similar Companies

Uber Interview Questions
4.2
 • 155 Interviews
Expedia Group Interview Questions
3.7
 • 78 Interviews
LinkedIn Interview Questions
4.3
 • 69 Interviews
OLX Interview Questions
3.8
 • 60 Interviews
Facebook Interview Questions
4.3
 • 53 Interviews
Uplers Interview Questions
3.9
 • 43 Interviews
Groupon Interview Questions
3.1
 • 42 Interviews
Fareportal Interview Questions
3.3
 • 32 Interviews
Yahoo Interview Questions
4.6
 • 30 Interviews
Airbnb Interview Questions
3.7
 • 25 Interviews
View all
Amazon SDE Salary
based on 336 salaries
₹14 L/yr - ₹50 L/yr
41% more than the average SDE Salary in India
View more details

Amazon SDE Reviews and Ratings

based on 26 reviews

3.6/5

Rating in categories

3.6

Skill development

3.2

Work-life balance

4.0

Salary

2.6

Job security

3.5

Company culture

3.2

Promotions

3.4

Work satisfaction

Explore 26 Reviews and Ratings
SDE

Chennai

0-8 Yrs

Not Disclosed

SDE

Chennai

3-10 Yrs

Not Disclosed

Explore more jobs
Customer Service Associate
4.1k salaries
unlock blur

₹0.6 L/yr - ₹7.8 L/yr

Transaction Risk Investigator
3.1k salaries
unlock blur

₹2 L/yr - ₹6.3 L/yr

Associate
3k salaries
unlock blur

₹0.8 L/yr - ₹7 L/yr

Senior Associate
2.6k salaries
unlock blur

₹1.8 L/yr - ₹9 L/yr

Software Developer
2.2k salaries
unlock blur

₹27.1 L/yr - ₹56.3 L/yr

Explore more salaries
Compare Amazon with

Flipkart

3.9
Compare

TCS

3.6
Compare

Google

4.4
Compare

Netflix

4.3
Compare
write
Share an Interview