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

SDE - Intern

Amazon
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Dynamic Programming, Stacks, Array Manipulation, Linked List, Binary Trees, Divide and Conquer
Tip
Tip

Tip 1 : Learn all basic DSA with their time and space complexities first. Then move on to company-specific problems.
Tip 2 : Have some experience in competitive programming, as it helps you to arrive at solutions quickly.
Tip 3 : Have decent projects and mention them on your resume... Prepare for every possible question that can be asked from them.

Application process
Where: Campus
Eligibility: No backlogs
Resume Tip
Resume tip

Tip 1 : Be honest on your resume. Don't mention things which you are not comfortable with.
Tip 2 : Have at least two decent projects on your resume... Mentioning tech used in them is a plus.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date29 Sep 2020
Coding problem0

There was a time slot of a whole day. Had to attempt a test.

02
Round
Medium
Video Call
Duration60 minutes
Interview date21 Nov 2020
Coding problem2

The interviewer was very friendly and introduced herself. She told me that she had two coding problems for this round.

1. Spiral Order Traversal of a Binary Tree

Easy
20m average time
75% success
0/40
Asked in companies
ArcesiumPayUSamsung

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
    1
   / \
  2   3
     / \
    4   5

Output: 1 3 2 4 5
Try solving now

2. Row Of A Matrix With Maximum Ones

Moderate
20m average time
80% success
0/80
Asked in companies
CiscoAmazonUrban Company (UrbanClap)

You are given a 2D matrix 'ARR' (containing either ‘0’ or ‘1’) of size 'N' x 'M', where each row is in sorted order.


Find the 0-based index of the first row with the maximum number of 1's.


Note :
If two rows have the same number of 1’s, return the row with a lower index.

If no row exists where at-least one '1' is present, return -1.


Example:
Input: ‘N’ = 3, 'M' = 3
'ARR' = 
[     [ 1,  1,  1 ],
      [ 0,  0,  1 ],
      [ 0,  0,  0 ]   ]

Output: 0

Explanation: The 0th row of the given matrix has the maximum number of ones.
Try solving now
03
Round
Medium
Video Call
Duration70 minutes
Interview date21 Dec 2020
Coding problem2

This round was held 30 minutes after the 2nd round. There were two interviewers and both introduced themselves. Both of them were friendly and made me comfortable for the round.

1. Sort An Array According To The Count Of Set Bits

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

You are given an array consisting of N positive integers, and your task is to sort the array in decreasing order of count of set bits in the binary representation of the integers present in the array.

In other words, you have to modify the array such that an integer with more number of set bits should appear before the integer which has lesser number of set bits in its binary representation.

The number of set bits is nothing but the number of 1s present in the binary representation of the integer. For example, the number of set bits in 5(0101) is equal to 2.

Note :

1. If any two numbers have the same count of set bits, then in the sorted array they will appear in the order in which they appear in the original array. For example, let the array be { 2, 4, 3}, in this case, both 2 and 4 have the same number of set bits so the answer will be {3, 2, 4} and not {3, 4, 2}, because in the original array 2 appears before 4.

2. The array may contain duplicate elements.
Try solving now

2. Rotting Oranges

Moderate
20m average time
78% success
0/80
Asked in companies
MicrosoftAmazonApple

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    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 create a function in JavaScript?

    Choose another skill to practice
    Start a Discussion
    Similar interview experiences
    company logo
    SDE - Intern
    3 rounds | 3 problems
    Interviewed by Amazon
    1286 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 7 problems
    Interviewed by Amazon
    486 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 3 problems
    Interviewed by Amazon
    500 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    1 rounds | 3 problems
    Interviewed by Amazon
    966 views
    0 comments
    0 upvotes
    Companies with similar interview experiences
    company logo
    SDE - Intern
    4 rounds | 7 problems
    Interviewed by Microsoft
    12783 views
    1 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 6 problems
    Interviewed by Microsoft
    7519 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 3 problems
    Interviewed by Google
    5356 views
    1 comments
    0 upvotes