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

SDE - 1

Amazon
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures and Algorithm, DBMS, System Design, Trees, Graph, Dynamic Programming
Tip
Tip

Tip 1 : Be Consistent while preparing
Tip 2 : Read Interview experiences
Tip 3 : Practice most asked question on leetcode

Application process
Where: Other
Eligibility: No Criteria
Resume Tip
Resume tip

Tip 1 : Add previous company experience
Tip 2 : Keep it short and simple

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 mins
Interview date1 Mar 2022
Coding problem1

2 coding questions + behaviour questions

1. K Characters Substring

Moderate
0/80
Asked in company
Amazon

You are given a string ‘str’, and an integer ‘K’, your task is to find the length of the longest substring such that the frequency of each character is greater than or equal to ‘K’.

For example:
You are given, ‘str’ = ‘aabba’, and ‘K’ = 2, The longest substring with each character’s frequency at least ‘K’ is ‘aabba’, whose length is 5. Hence the answer is 5.
Problem approach

count all the subarrays with at most K distinct characters and then subtract all the subarrays with atmost K – 1 characters

Try solving now
02
Round
Medium
Video Call
Duration60 mins
Interview date1 Apr 2022
Coding problem2

coding questions

1. Swap Nodes in Pairs

Moderate
40m average time
60% success
0/80
Asked in companies
Dell TechnologiesWalmartOLX Group

You are given a singly linked list of integers.

Your task is to swap every two adjacent nodes, and return the head of the modified, linked list.

For Example:

We have a linked list 1->2->3->4->5->6->7 and so on. You are supposed to swap pairs of a linked list like swap (1,2), (3,4), (5,6), and so on.
Note:
1. You may not modify the data in the list’s nodes; only nodes themselves may be changed. Because imagine a case where a node contains many fields, so there will be too much unnecessary swap.

2. If a pair of a node does not exist, then leave the node as it is.
Problem approach

standard linkedlist question

Try solving now

2. Diameter Of Binary Tree

Easy
10m average time
90% success
0/40
Asked in companies
AdobePhonePeAmazon

You are given a Binary Tree.


Return the length of the diameter of the tree.


Note :
The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.

The number of edges between two nodes represents the length of the path between them.
Example :
Input: Consider the given binary tree:

Example

Output: 6

Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.


Problem approach

did by recursion

Try solving now
03
Round
Easy
Video Call
Duration60 mins
Interview date5 Apr 2022
Coding problem2

dynamic programming and hashmap question asked

1. Break The Integer

Moderate
30m average time
70% success
0/80
Asked in companies
AdobeAmazonMicrosoft

Ninja is given an integer ‘N’ . One day Ninja decides to break the integer into K positive parts (K>=2) such that the sum of all parts is equal to ‘N’.Ninja wants to maximize the product of all the ‘K’ parts.

Help Ninja in helping what maximum possible product it can obtain by breaking the integer ‘N’ into ‘K’ positive parts where ‘K’ can be any integer greater than 2.

Problem approach

initially solved with dp and then with math trick

Try solving now

2. Longest Subarray Zero Sum

Moderate
18m average time
85% success
0/80
Asked in companies
OlaPayUAmazon

Given an array arr of length N consisting of positive and negative integers, return the length of the longest subarray whose sum is zero.

Problem approach

firstly solved bruteforce and then optimised the solution with help pf hashmap

Try solving now
04
Round
Easy
HR Round
Duration60 mins
Interview date15 Apr 2022
Coding problem1

Bar raiser round

1. Basic HR Questions

questions related to previous company experience were asked

Problem approach

Tip 1: Use STAR approach to explain the projects
Tip 2: Be honest
Tip 3: Read Amazon principals before the interview

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
1592 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