Amazon | 6 months intern | Hyderabad, India
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.
Full Experience
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.
- 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.
- 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!
Interview Questions (6)
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.
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).
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).
Given a sorted array of integers, construct a Binary Search Tree (BST) with the minimum possible height.
Preparation Tips
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.