Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Amazon
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures and Algorithms, Operating Systems, Computer Networks, Java
Tip
Tip

Tip 1 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume.
Tip 2 : You should be able to answer each and every thing present in your resume. Don't lie in your resume.
Tip 3 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems

Application process
Where: Campus
Eligibility: Above 65 percent
Resume Tip
Resume tip

Tip 1 : Mention your skills in which you are perfect
Tip 2 : Mention atleast two projects

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date28 Jul 2020
Coding problem2

There was 2 coding questions
Based on ds and algorithms

1. Ninja and power of 2

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

Ninja loves playing with numbers. So one day, he wants to arrange a few numbers in the ‘N’ number of rows. The first row contains 1 number, the second row has two numbers, the third row has 4 numbers, and so on.

Ninja starts placing numbers in increasing order, with absolute difference 1, starting from 1 and continuing till he encounters 9, and then he again restarts from 1.

You are given an integer ‘N’ denoting the given number of rows. Can you print the pattern Ninja wants to create?

Pattern for N = 4:

1
23
4567
89123456
Try solving now

2. Validate BST

Moderate
25m average time
0/80
Asked in companies
AmazonFlipkartHike

You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.

A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
Example :

BST1

Answer :

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtrees for node 5 are empty.

Level 3:

For node 1:
The left and right subtrees for node 1 are empty.
For node 3:
The left and right subtrees for node 3 are empty.

Because all the nodes follow the property of a binary search tree, the above tree is a binary search tree.
Try solving now
02
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date28 May 2020
Coding problem2

There was 2 coding questions based on ds and algorithms

1. Zig - Zag Array

Easy
0/40
Asked in companies
AmazonJosh Technology Group

You are given an array of distinct elements, and you have to rearrange the array elements in a zig-zag fashion. In other words, for every odd position ‘i’ in the array 'ARR,' 'ARR'[i] should be greater than 'ARR'[i-1] and 'ARR'[i] should be greater than 'ARR'[i+1].

For example:

Given ‘N’ = 4, 
'ARR' = { 4, 3, 2, 1} 
Then a possible array is 3, 4, 1, 2.
Note:
You are supposed to return the array, which is in a zig-zag fashion.

Since there can be multiple answers for a particular array, any of the possible solutions are accepted.

It can be proved. A zig-zag array is always possible for a given array.
Try solving now

2. Flatten a linked List

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

You are given a linked list containing 'n' 'head' nodes, where every node in the linked list contains two pointers:


(1) ‘next’ which points to the next node in the list

(2) ‘child’ pointer to a linked list where the current node is the head.


Each of these child linked lists is in sorted order and connected by 'child' pointer.


Your task is to flatten this linked such that all nodes appear in a single layer or level in a 'sorted order'.


Example:
Input: Given linked list is:

Output:
1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9 → 12 → 20 → null.


Explanation:
The returned linked list should be in a sorted order. All the elements in this returned linked list are connected by 'child' pointers and 'next' pointers point to null.


Try solving now
03
Round
Medium
Video Call
Duration45 Minutes
Interview date18 Jun 2020
Coding problem1

My interview started at 9:30 and it took around 45 minutes to complete my interview.This was held on Amazon Chime and the interview lasted for 1 hour. Firstly the interviewer asked to introduce about myself, later asked regarding the projects I have mentioned in my resume. Then started displaying the coding question. The first question is number of islands in a matrix.

1. Find Number of Islands

Moderate
34m average time
60% success
0/80
Asked in companies
OlaLinkedInArcesium

You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

A cell is said to be connected to another cell, if one cell lies immediately next to the other cell, in any of the eight directions (two vertical, two horizontal, and four diagonals).

A group of connected cells having value 1 is called an island. Your task is to find the number of such islands present in the matrix.

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 write a single-line comment in C++?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
923 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
1189 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
479 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
1605 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
49760 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
11079 views
2 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Google
9684 views
0 comments
0 upvotes