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

Solutions & Support Engineer

Amazon
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data structures & algorithms, Computer networks, COA, Web development
Tip
Tip

Tip 1 : Practice DSA a lot
Tip 2 : Have good knowledge about your projects and don't copy them.
Tip 3 : Revise core subjects before the interview

Application process
Where: Campus
Resume Tip
Resume tip

Tip 1 : Write only those things that you know well.
Tip 2 : Do not exaggerate your skills 
Tip 3 : Include your projects at least two minimum

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date15 Jul 2022
Coding problem2

The timing was 4-6 pm
It was an online round ,questions were easy to hard

1. Rod cutting problem

Moderate
40m average time
75% success
0/80
Asked in companies
Goldman SachsSamsungRazorpay

Given a rod of length ‘N’ units. The rod can be cut into different sizes and each size has a cost associated with it. Determine the maximum cost obtained by cutting the rod and selling its pieces.

Note:
1. The sizes will range from 1 to ‘N’ and will be integers.

2. The sum of the pieces cut should be equal to ‘N’.

3. Consider 1-based indexing.
Problem approach

Method 1 : A naive solution to this problem is to generate all configurations of different pieces and find the highest-priced configuration. This solution is exponential in terms of time complexity. Let us see how this problem possesses both important properties of a Dynamic Programming (DP) Problem and can efficiently be solved using Dynamic Programming.

Try solving now

2. Coin Change(Finite Supply)

Hard
0/120
Asked in companies
IBMAdobeAmazon

You are given an array of integers ‘coins’ denoting the denomination of coins and another array of integers ‘freq’ denoting the number of coins of each denomination.

You have to find the number of ways to make the sum ‘V’ by selecting some(or all) coins from the array.

The answer can be very large. So, return the answer modulo 1000000007.

For Example :
‘N’ = 3, ‘coins’ = {1, 2, 3}, ‘freq’ = {1, 1, 3}, ‘V’ = 6

For the given example, we can make six by using the following coins:
{1, 2, 3}
{3. 3}
Hence, the answer is 2.
Problem approach

We have 2 choices for a coin of a particular denomination, either i) to include, or ii) to exclude.
If we are at coins[n-1], we can take as many instances of that coin ( unbounded inclusion ) i.e count(coins, n, sum – coins[n-1] ); then we move to coins[n-2]. 
After moving to coins[n-2], we can’t move back and can’t make choices for coins[n-1] i.e count(coins, n-1, sum). 
Finally, as we have to find the total number of ways, so we will add these 2 possible choices, i.e count(coins, n, sum – coins[n-1] ) + count(coins, n-1, sum );

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date7 Sep 2022
Coding problem1

Asked some DSA questions and one programming logic questions

1. Painting Fences

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonPayPalCodenation

You are given ‘N’ fences. Your task is to find the total number of ways to paint fences using 2 colors only such that at most 2 adjacent fences are painted with the same color.

As the answer can be too large, return the answer modulo 10^9 + 7.

For Example:
Consider If N = 2, then there can be 4 different ways to color fences such that at most 2 adjacent fences have the same color-:
[ [0, 1],
  [1, 0],
  [1, 1],
  [0, 0] ]
Hence, the answer is 4.
Problem approach

diff = no of ways when color of last
two posts is different
same = no of ways when color of last 
two posts is same
total ways = diff + same

for n = 1
diff = k, same = 0
total = k

for n = 2
diff = k * (k-1) //k choices for
first post, k-1 for next
same = k //k choices for common 
color of two posts
total = k + k * (k-1)

for n = 3
diff = k * (k-1)* (k-1) 
//(k-1) choices for the first place 
// k choices for the second place
//(k-1) choices for the third place
same = k * (k-1) * 2
// 2 is multiplied because consider two color R and B
// R R B or B R R 
// B B R or R B B 
c'' != c, (k-1) choices for it

Hence we deduce that,
total[i] = same[i] + diff[i]
same[i] = diff[i-1]
diff[i] = (diff[i-1] + diff[i-2]) * (k-1)
= total[i-1] * (k-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
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
2294 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 - Intern
2 rounds | 3 problems
Interviewed by Amazon
1043 views
0 comments
0 upvotes