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

Software Engineer

Amazon
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Binary Tree, Binary Search Tree, Dynamic programming , Operatig System, Linked List
Tip
Tip

Tip 1 : Clean Resume
Tip 2 : Brush up core CSE subjects
Tip 3 : Good grasp of Data structure at least solve 500 leetcode easy-medium problem

Application process
Where: Referral
Eligibility: Good internship atleast in my case
Resume Tip
Resume tip

Tip 1 : Good Internship
Tip 2 : Clean and to the point

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date3 Nov 2022
Coding problem2

This round Consist of 2 medium hard version problem and an amazon leadership problem

1. Balanced parentheses

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

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

First, think out loud and always discuss the approach with the interviewer I solved using a stack

Try solving now

2. Compress the String

Moderate
32m average time
60% success
0/80
Asked in companies
MicrosoftArcesiumAmazon

Write a program to do basic string compression. For a character which is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions.

Example:
If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
Note:
Consecutive count of every character in the input string is less than or equal to 9. You are not required to print anything. It has already been taken care of. Just implement the given function and return the compressed string.
Problem approach

I used string inbuilt function quite easy

Try solving now
02
Round
Hard
Video Call
Duration60 minutes
Interview date10 Nov 2022
Coding problem2

This round was held at 11 in the morning and interviewer was SDE-2 located in Hyderabad

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
HCL TechnologiesCiti BankAtlassian

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

I used two array to store next greater element and nest smaller element and subtractedit interviewer was impressed

Try solving now

2. Minimum coins

Easy
5m average time
90% success
0/40
Asked in company
Amazon

You are given a permutation 'A' of length 'N'. You can apply the following operation any number of times which costs 1 coin for each operation.

Select any subarray of length at most 'N' - 1 and rearrange the elements in any order.

Return the minimum number of coins required to sort the permutation in increasing order.

A permutation is an array in which each element from 1 to 'N' occurs exactly once.

For Example:-
Let 'N' = 5, 'A' = [1, 2, 3, 5, 4].
We can apply the operation to the subarray from index 4 to 5 (1-based indexing).
So our answer is 1.
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
Software Engineer
3 rounds | 5 problems
Interviewed by Amazon
3674 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
0 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by Amazon
0 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 15 problems
Interviewed by Amazon
1714 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7976 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Samsung
2936 views
0 comments
0 upvotes