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

SDE - 1

Amazon
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 months
Topics: Data Structures, Algorithms, Competitive programming etc.
Tip
Tip

Tip 1 : practice at least 500 different type of questions 
Tip 2 : You have to do projects in your interesting domain
Tip 3 : Be confident while doing questions. Always try not to see topics again and again

Application process
Where: Referral
Eligibility: Above 7 CGPA is best
Resume Tip
Resume tip

Tip 1 : Put some of your internships 
Tip 2 : Put those projects that involves coding

Interview rounds

01
Round
Hard
Online Coding Interview
Duration90 minutes
Interview date8 Jun 2022
Coding problem1

1. Sum Of Two Arrays

Easy
15m average time
85% success
0/40
Asked in companies
AmazonIBMUber

You are given two numbers 'A' and 'B' in the form of two arrays (A[] and B[]) of lengths 'N' and 'M' respectively, where each array element represents a digit. You need to find the sum of these two numbers and return this sum in the form of an array.

Note:

1. The length of each array is greater than zero.

2. The first index of each array is the most significant digit of the number. For example, if the array A[] = {4, 5, 1}, then the integer represented by this array is 451 and array B[] = {3, 4, 5} so the sum will be 451 + 345 = 796. So you need to return {7, 9, 6}.

3. Both numbers do not have any leading zeros in them. And subsequently, the sum should not contain any leading zeros.
Try solving now
02
Round
Hard
Video Call
Duration75 minutes
Interview date14 Jul 2022
Coding problem1

1. Count the nodes.

Moderate
0/80
Asked in companies
Morgan StanleyAdobeAmazon

Ninja found an old book that has a given tree of numbers. Ninja is interested to find the number of members of that tree that has more children than its parent.

There are ‘N’ nodes in the tree and each node is indexed with a number between 0 to ‘N’-1. The tree is given in a form of an ‘EDGES’ array. Each element of ‘EDGES’ has two values, denoting an edge between that two nodes. The root of the tree is Node 0. Your task is to find the number of nodes having more children than their parent’s node.

For Example
For the given ‘EDGES’ = [ [0,1],[1,2],[1,3],[1,4] ] and ‘N’ = 5.The number of nodes satisfying the condition is 1. Only Node 1 satisfies the given condition.

alt-text

Try solving now
03
Round
Hard
Video Call
Duration60 minutes
Interview date20 Jul 2022
Coding problem2

1. Check If One String Is A Rotation Of Another String

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

You are given two Strings 'P' and 'Q' of equal length.


Your task is to return 1 if String 'P' can be converted into String 'Q' by cyclically rotating it to the right any number of times ( Possibly Zero ), else return 0.


A cyclic rotation to the right on String 'A' consists of taking String 'A' and moving the rightmost character to the leftmost position. For example, if 'A' = "pqrst", then it will be "tpqrs" after one cyclic rotation on 'A'.


For example:
Consider the two strings 'P' = "abfyg" and 'Q' = "gabfy" 

If we cyclically rotate String 'P' to the right once. The resulting string P becomes "gabfy" which is equal to String 'Q'. 

Therefore it is possible to convert String 'P' to String 'Q'.
Problem approach

class Solution
{
//Function to check if a string can be obtained by rotating
//another string by exactly 2 places.
public static boolean isRotated(String str1, String str2)
{
if(str1.length() != str2.length()){
return false;
}
if(str1.length() == 1){
return str1.equals(str2);
}
// char[] c1 = new char[str1.length()];
// char[] c2 = new char[str2.length()];
// for(int i = 0; i < c1.length; i++){
// c1[i] = str1.charAt[i]
// }
// for(int i = 0; i < c2.length; i++){
// c2[i] = str2.charAt[i]
// }
String clock = "";
String anti = "";
int len = str1.length();
clock = str1.substring(len - 2, len) + str1.substring(0, len - 2);
anti = str1.substring(2, len) + str1.substring(0, 2);
if(str2.equals(clock) || str2.equals(anti)){
return true;
}
return false;
}

}

Try solving now

2. Technical Question

What is an efficient way to implement a singleton pattern in Java? Give me an code example

04
Round
Hard
Assignment
Duration45 minutes
Interview date22 Jul 2022
Coding problem1

1. Technical Questions

There are some questions based on Linked list, tree, stack, array, heap sort definition and structures. Also I have to define them in my own way.

 

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
3085 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2295 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
8963 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
5984 views
5 comments
0 upvotes