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

SDE - 2

Amazon
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data structures and Algorithms, Dynamic Programming, Operating systems, Computer Networks, DBMS.
Tip
Tip

Tip 1 : Get perfect in any one programming language.
Tip 2 : Learn DSA perfectly
Tip 3 : Competitive Programming is best for practice

Application process
Where: Campus
Eligibility: Above 6.50 Cgpa
Resume Tip
Resume tip

Tip 1 : Mention every small thing done in your academics
Tip 2 : Don't explain more about projects in resume, 2 points are enough

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date1 Mar 2021
Coding problem2

It was morning
Environment is friendly
Only one interviewer was present. After a brief introduction he asked me about my projects.
Next he gave me 2coding questions where I took each question 30min.
Interviewer was good, he corrected my mistakes too.

1. Flatten Linked List

Moderate
0/80
Asked in companies
AmazonExpedia GroupDunzo

You are given a Multilevel Linked List of integers, where in addition to the next pointer each node has a child pointer, which may or may not point to a separate list. These child lists may have one or more children of their own, and so on, to produce a multilevel data structure, as shown in the below figure. You are given the head of the first level of the list. Flatten the list so that all the nodes appear in a single-level linked list. You need to flatten the list in a way that all nodes at first level should come first, then nodes of the second level, and so on.

example

                FIGURE 1

Input for the above list is:
10 5 12 7 11 -1 4 20 13 -1 -1 -1 17 6 -1 -1 -1  2 -1 16 -1 9 8 -1 -1 -1 3 -1 19 15 -1 -1 -1 -1 -1
Try solving now

2. Rat In A Maze

Easy
15m average time
85% success
0/40
Asked in companies
AdobeOYOCIS - Cyber Infrastructure

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

Note:
Here, sorted paths mean that the expected output should be in alphabetical order.
For Example:
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1 
Expected Output:
DDRDRR DRDDRR 
i.e. Path-1: DDRDRR and Path-2: DRDDRR

The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Try solving now
02
Round
Medium
Online Coding Interview
Duration40 minites
Interview date11 Mar 2021
Coding problem1

Morning
Good environment
Interviewer is good

1. Triplets with Given Sum

Moderate
15m average time
85% success
0/80
Asked in companies
BarclaysMeeshoFreshworks

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

Note:
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Try solving now
03
Round
Hard
Online Coding Interview
Duration40 minutes
Interview date21 Mar 2021
Coding problem1

Good

1. Palindrome Partitioning ll

Hard
40m average time
60% success
0/120
Asked in companies
AmazonAdobeGoogle

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


Find the minimum number of partitions in the string so that no partition is empty and every partitioned substring is a palindrome.


Example :
Input: 'str' = "aaccb"

Output: 2

Explanation: We can make a valid partition like aa | cc | b. 
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

Which operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Amazon
1666 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
1141 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 8 problems
Interviewed by Amazon
2210 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
552 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
24914 views
8 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Dunzo
2568 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Samsung
2113 views
0 comments
0 upvotes