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

SDE - 1

Amazon
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 months
Topics: Data Structures, OS, OOPS, System Design, Graph Algorithms, DP and bit manipulation
Tip
Tip

Tip 1 : Prepare basics thoroughly
Tip 2 : Get a good insight on your resume
Tip 3 : Practise coding contests

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

Tip 1 : Do relevant projects in Development
Tip 2 : Prepare sample questions and answers on your projects.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date23 Oct 2021
Coding problem1

Timing - 8 pm - 9 pm
Environment - Online with webcam on

1. Sort 0 1 2

Easy
22m average time
0/40
Asked in companies
Expedia GroupWalmartHCL Technologies

You have been given an integer array/list(ARR) of size 'N'. It only contains 0s, 1s and 2s. Write a solution to sort this array/list.

Note :
Try to solve the problem in 'Single Scan'. ' Single Scan' refers to iterating over the array/list just once or to put it in other words, you will be visiting each element in the array/list just once.
Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date2 Dec 2021
Coding problem2

It was held in morning from 9 to 10 am.
The interviewer was casual and kept giving me ample time and hints when I deviated from the correct approach.
He made the environment very friendly and tried to relieve the stress I was in.

1. K Largest Element

Moderate
10m average time
90% success
0/80
Asked in companies
AmazonWalmartPayPal

You are given an unsorted array containing ‘N’ integers. You need to find ‘K’ largest elements from the given array. Also, you need to return the elements in non-decreasing order.

Problem approach

This can be solved using kth order statistics algorithm. Basically, we need to first find the kth largest element and then partition the array about this element using the quicksort algorithm.
This way it can be done in O(n) time complexity

Try solving now

2. Next Greater Element

Moderate
20m average time
90% success
0/80
Asked in companies
PayPalSamsungDunzo

You are given an array arr of length N. You have to return a list of integers containing the NGE(next greater element) of each element of the given array. The NGE for an element X is the first greater element on the right side of X in the array. Elements for which no greater element exists, consider the NGE as -1.

For Example :

If the given array is [1, 3, 2], then you need to return [3, -1, -1]. Because for 1, 3 is the next greater element, for 3 it does not have any greater number to its right, and similarly for 2.
Problem approach

Basically, we need to use stack data structure. We iterate over the given array and we keep pushing elements in the stack if the current element is smaller than the element on the top of the stack.
If we encounter a larger number, we just pop elements from the stack which are smaller than the current element and the current element is the next greater element for all of these numbers.

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