amazon logo
Amazon· sde intern

Amazon | 6 months intern | Hyderabad, India

Result
Offer
Location
hyderabad, india
Posted
29 Oct 2020
291 reads

Summary

I successfully navigated a challenging interview process for an SDE Intern role at Amazon in Hyderabad, India, securing an offer despite facing a particularly demanding final technical round.

How it went

Round 1: Online Assessment

The first round was an online assessment on Amcat, divided into four sections: a debugging round, a coding round, logical reasoning, and workstyles behavior questions. The coding section specifically featured two problems:

Round 2: Technical Interview - 1

This one-hour round began with a brief 'tell me about yourself' before moving into two coding questions.

  1. The first question involved implementing an array that supports two operations: finding the sum within a given range and updating an element at a specific index. I initially discussed brute-force and prefix sum approaches, then, with a hint from the interviewer to consider data structures, I proposed a Segment Tree. I detailed its construction and query process, which satisfied the interviewer.
  2. The second question was to determine if a given tree is a max-heap. I explained that this requires checking both the max-heap property (parent nodes are greater than or equal to their children) and if it's a complete binary tree. This round went quite well, and I felt confident. I received a call for the next round on the same day.

Round 3: Technical Interview - 2

This was, without a doubt, my worst interview experience. The interviewer mentioned network issues and then gave me the first question: Best Time to Buy and Sell Stock IV. He instructed me to code it within 10 minutes without any explanation. I managed to code an answer, but he immediately claimed it was wrong.

He then presented a second question: constructing a minimal height BST from a sorted array. I completed this in about 4 minutes, ensuring it covered all edge cases. Again, he stated it was wrong and asked me to write the TreeNode class, which I did. His demeanor became very harsh; he gave me 7 more minutes to solve the first question, declaring that success meant the job, and failure meant no offer. He then abruptly left the meeting, leaving the live code link active for 10 minutes. I did manage to solve the question within that additional time.

Given this challenging experience, I had very low expectations of being selected, especially since friends who interviewed with the same person had even worse experiences. However, after 5 days, the results were announced, and I was selected. The outcome was positive!

Questions asked (6)

  1. 01

    Critical Connections in a Network

    Data Structures & Algorithms · Hard

    Given an undirected connected graph, return all critical connections in this graph. A critical connection is an edge that, if removed, will make the graph disconnected.

    Open the problem
  2. 02

    Search a 2D Matrix II

    Data Structures & Algorithms · Medium

    Write an efficient algorithm that searches for a target value in an m x n integer matrix. This matrix has the following properties: integers in each row are sorted in ascending order from left to right; integers in each column are sorted in ascending order from top to bottom.

    Open the problem
  3. 03

    Array Range Sum Query and Update

    Data Structures & Algorithms · Medium

    Given an array, implement two operations: finding the sum of elements within a given range [start_index, end_index] and updating the value of an element at a given index.

  4. 04

    Validate Max-Heap

    Data Structures & Algorithms · Medium

    Determine if a given binary tree satisfies the properties of a max-heap (i.e., the value of each node is greater than or equal to the values of its children, and it is a complete binary tree).

  5. 05

    Best Time to Buy and Sell Stock IV

    Data Structures & Algorithms · Hard

    You are given an integer array prices where prices[i] is the price of a given stock on the ith day. Design an algorithm to find the maximum profit you can achieve. You may complete at most k transactions. You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).

    Open the problem
  6. 06

    Convert Sorted Array to Binary Search Tree

    Data Structures & Algorithms · Easy

    Given a sorted array of integers, construct a Binary Search Tree (BST) with the minimum possible height.

How they prepared

My preparation involved applying for the role through the Amazon jobs portal as instructed during campus placements. I focused on practicing LeetCode problems, particularly those involving data structures like Segment Trees, which proved useful during the technical interviews. My previous interview experience with Amazon also contributed to my preparation for this opportunity.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Amazon recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!