Amazon SDE Interview Experience: Set 43

Company Name: Amazon 

Designation: SDE1 

Experience: 1.5 years 

Preparation for Amazon

Topics: Data Structures and Algorithms

Duration: 6 months

Source of Preparation: Leetcode, GFG, Striver’s SDE sheet.Blind 75 Leetcode

Amazon Interview Rounds

Round 1: There were two questions asked in the online round.

Round 2: Technical Interview

  • Reverse a Linked List: Given the head of a singly linked list, write a program to reverse the linked list, and return the head pointer to the reversed list.
  • Construct Binary Tree from inorder and preorder 

Round 3: Technical Interview

  • Length of the longest subarray with zero Sum: Given an array containing both positive and negative integers, we have to find the length of the longest subarray with the sum of all elements equal to zero.
  • Flattening a Linked List: Given a Linked List of size N, where every node represents a sub-linked-list and contains two pointers:
    (i) a next pointer to the next node,
    (ii) a bottom pointer to a linked list where this node is head.
    Each of the sub-linked-list is in sorted order.
    Flatten the Link List such that all the nodes appear in a single level while maintaining the sorted order.

Round 4: Technical + Managerial Interview

  • Why do you want to join amazon?
  • Questions on my projects followed by a DSA question
  • Minimum Path Sum In a Grid: We are given an “N*M” matrix of integers. We need to find a path from the top-left corner to the bottom-right corner of the matrix, such that there is a minimum cost past that we select. At every cell, we can move in only two directions: right and bottom. The cost of a path is given as the sum of the values of cells of the given matrix.

Verdict: Selected