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

Amazon
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Algorithms, Dynamic Programming, OOPS, Trees, Graphs
Tip
Tip

Tip 1 : Smart Preparation is very important instead of just preparing everything.
Tip 2 : Going through previous interview experiences helps a lot.
Tip 3 : Focussing on time and space complexities instead of just the logic.
Tip 4 : Be thorough with the projects mentioned in resume.
Tip 5 : Daily practice of as many questions as possible with at least a couple of questions with level:Hard

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

Tip 1 : Keep it technical and to the point with no catch phrases.
Tip 2 : Use of action verbs to highlight the work put in projects or any previous internships.
Tip 3 : Use of bullet points.
Tip 4 : Mention clickable links of your projects, github account and certificates whenever possible.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 Minutes
Interview date27 Sep 2020
Coding problem2

Around 4-5 pm
2 coding questions
7 debugging and output questions
20-30 aptitude questions
A section to test psychology based on various questions and situations.

1. Clone Linked List with Random Pointer

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftUrban Company (UrbanClap)Amazon

Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer is random and can point to any node of the list or null. The task is to create a deep copy of the given linked list and return its head. We will validate whether the linked list is a copy of the original linked list or not.

A deep copy of a Linked List means we do not copy the references of the nodes of the original Linked List rather for each node in the original Linked List, a new node is created.

For example,

example

Random pointers are shown in red and next pointers in black.

Try solving now

2. Next Smaller Element

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

You are given an array 'ARR' of integers of length N. Your task is to find the next smaller element for each of the array elements.

Next Smaller Element for an array element is the first element to the right of that element which has a value strictly smaller than that element.

If for any array element the next smaller element does not exist, you should print -1 for that array element.

For Example:

If the given array is [ 2, 3, 1], we need to return [1, 1, -1]. Because for  2, 1 is the Next Smaller element. For 3, 1 is the Next Smaller element and for 1, there is no next smaller element hence the answer for this element is -1.
Try solving now
02
Round
Medium
Video Call
Duration50 Minutes
Interview date27 Nov 2020
Coding problem1

Timing - 4pm
Just asked one question based on DSA and asked to make the code modular and well indented.
Didn’t even ask for introduction.

1. 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
    03
    Round
    Medium
    Video Call
    Duration60 Minutes
    Interview date28 Nov 2020
    Coding problem2

    Started at 4pm
    Interviewer introduced himself and then asked me for a brief introduction.
    Went ahead to ask 2 DSA based questions.

    1. Merge k sorted lists

    Hard
    25m average time
    65% success
    0/120
    Asked in companies
    MicrosofteBayAmazon

    Given 'k' sorted linked lists, each list is sorted in increasing order. You need to merge all these lists into one single sorted list. You need to return the head of the final linked list.


    For example:
    Input:
    3
    3
    4 6 8
    3
    2 5 7 
    2
    1 9
    
    Output:
    1 2 4 5 6 7 8 9 
    
    Explanation:
    First list is: 4 -> 6 -> 8 -> NULL
    Second list is: 2 -> 5 -> 7 -> NULL
    Third list is: 1 -> 9 -> NULL
    The final list would be: 1 -> 2 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> NULL
    
    Try solving now

    2. Rat In A Maze

    Easy
    15m average time
    85% success
    0/40
    Asked in companies
    AdobeOYOCIS - Cyber Infrastructure

    You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

    Note:
    Here, sorted paths mean that the expected output should be in alphabetical order.
    
    For Example:
    Given a square matrix of size 4*4 (i.e. here 'N' = 4):
    1 0 0 0
    1 1 0 0
    1 1 0 0
    0 1 1 1 
    Expected Output:
    DDRDRR DRDDRR 
    i.e. Path-1: DDRDRR and Path-2: DRDDRR
    
    The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
    
    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

    Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?

    Choose another skill to practice
    Start a Discussion
    Similar interview experiences
    company logo
    SDE - Intern
    3 rounds | 3 problems
    Interviewed by Amazon
    1241 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 7 problems
    Interviewed by Amazon
    453 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 3 problems
    Interviewed by Amazon
    454 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    1 rounds | 3 problems
    Interviewed by Amazon
    823 views
    0 comments
    0 upvotes
    Companies with similar interview experiences
    company logo
    SDE - Intern
    4 rounds | 7 problems
    Interviewed by Microsoft
    12619 views
    1 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 6 problems
    Interviewed by Microsoft
    7476 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 3 problems
    Interviewed by Google
    5326 views
    1 comments
    0 upvotes