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

SDE - 1

Amazon
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 months
Topics: Trees, Graphs, Dynamic Programming, Operating System, OOPS, Linked List
Tip
Tip

Tip 1 : Try to learn the basic fundamentals first.
Tip 2 : Give as much contests you can, It will help you in coding rounds.
Tip 3 : Practice as much you can.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Make it one-pager 
Tip 2 : Mention things that are related to the job profile only

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 minutes
Interview date6 Dec 2022
Coding problem2

It contains MCQs and 2 coding questions.

1. Remove Duplicates From String

Moderate
25m average time
0/80
Asked in companies
SquadstackAmazonGoldman Sachs

You are given a string (STR) of length N, consisting of only the lower case English alphabet.

Your task is to remove all the duplicate occurrences of characters in the string.

For Example:
If the given string is:
abcadeecfb

Then after deleting all duplicate occurrences, the string looks like this:
abcdef
Problem approach

I simply traverse the linked list and skip all the next elements which have same value;

Try solving now

2. Left view of Binary Tree

Moderate
30m average time
60% success
0/80
Asked in companies
WalmartSalesforceDelhivery

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values



Example :
If the input tree is as depicted in the picture: 

alt text

The Left View of the tree will be:  2 35 2 
Problem approach

I simply do the preorder and at any point, if no element is printed at that level then I print that element. Its quite a standard question.

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date1 Jun 2022
Coding problem1

They first ask me about my current company and projects. After that he asks me some basics and then finally he gives me one question to do.

1. String Sorting

Moderate
30m average time
60% success
0/80
Asked in companies
FacebookHCL TechnologiesAmazon

You and your friend found a string ‘S’ of length ‘N’. You love to rearrange the strings, So you decided to rearrange this string too. But this time, your friend puts a constraint on rearranging. He gave you ‘M’ pairs of integers, each pair denoting two indices of the string ‘S’. He also gave you an operation. In one operation, you can select a pair of indices from the given ‘M’ pairs and swap the character present at those indices in the string.

Your task is to rearrange the strings following the given constraints and find the lexicographically smallest string that you can obtain by doing the operations any number of times (might be 0 as well).

Try solving now
03
Round
Medium
Video Call
Duration45 minutes
Interview date7 Jun 2022
Coding problem1

It was again start with introduction, then they discuss my projects asks me some behavior questions and then finally give me one coding question in the final minutes.

1. Longest Palindromic Substring

Moderate
20m average time
80% success
0/80
Asked in companies
MathworksLivekeeping (An IndiaMART Company)Goldman Sachs

You are given a string 'str' of length 'N'.


Your task is to return the longest palindromic substring. If there are multiple strings, return any.


A substring is a contiguous segment of a string.


For example :
str = "ababc"

The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome. 

There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
Problem approach

Its a typical 2D dp problem, for string(i,...j) to be palindrome string[i]=string[j] and string(i+1...j-1) should be palindrome. Like how we can break the problems in smaller parts and find the longest palindromic substring by applying 2D DP. I just make him understand my approach and he was out of time, so he finishes the interview there and he was satisfied with my approach.

Try solving now

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
3084 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2294 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