amazon logo
Amazon· SDE I

AMAZON | SDE1 | 2+ yr Exp

Result
Offer
Experience
2 years
Posted
17 Oct 2021
291 reads

Summary

I successfully completed a five-round interview process for an SDE1 position at Amazon, which included multiple coding challenges and behavioral questions, culminating in a job offer.

How it went

I recently went through an extensive interview process for an SDE1 role at Amazon, which comprised five distinct rounds culminating in a job offer. My journey began with an online coding test where I successfully solved two algorithmic problems related to network optimization.

Following this, I was invited for virtual interviews which were scheduled on different days. The second round involved two more coding challenges – one on binary tree manipulation and another on finding the next greater element in an array – alongside a discussion on Amazon's leadership principles. I was happy with my time and space complexity analysis for both problems.

The third round, held on the same day as the second, started with several behavioral questions based on leadership principles, followed by a coding problem requiring me to maximize the sum of k elements chosen from the ends of an array. I recognized it as a sliding window problem and implemented a two-pointer approach effectively.

The fourth round was a managerial discussion, primarily focused on leadership principles, but also included a quick coding question about removing duplicates from a string while maintaining order. I solved this using a StringBuilder and HashSet.

Finally, the fifth coding round presented two more algorithm problems: one on meeting rooms and another on finding the kth missing positive number. For the meeting rooms problem, I initially used two min-heaps and later discussed optimizing space with one heap. For the missing number problem, I started with a linear approach as requested and then moved to a binary search solution.

Throughout these rounds, I focused on clearly explaining my thought process, optimizing my solutions, and demonstrating my problem-solving skills, which ultimately led to receiving an acceptance mail from Amazon HR one week after my last interview.

Questions asked (8)

  1. 01

    Cheapest Flights Within K Stops

    Data Structures & Algorithms · Medium

    There are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi, toi, pricei] indicates that there is a flight from city fromi to city toi with cost pricei.

    You are also given three integers src, dst, and k. Return the cheapest price from src to dst with at most k stops. If there is no such route, return -1.

    The problem was contextualized as Amazon having a retail/transport business, asking how to calculate the cheapest flights within certain constraints.

    Open the problem
  2. 02

    Critical Connections in a Network

    Data Structures & Algorithms · Hard

    There are n servers numbered from 0 to n - 1 connected by undirected server-to-server connections forming a network where connections[i] = [a, b] represents a connection between servers a and b. Any server can reach any other server directly or indirectly through the network.

    A critical connection is a connection that, if removed, will make some server or group of servers unable to reach some other server or group of servers.

    Return all critical connections in the network in any order.

    The problem was contextualized as Amazon having a retail/transport business, asking how to identify important connections within their network.

    Open the problem
  3. 03

    Replace Node with Left Subtree Sum

    Data Structures & Algorithms · Medium

    Given a binary tree, replace each node's value with the sum of all node values in its left subtree. If a node has no left subtree, its value should be replaced with 0.

  4. 04

    Next Greater Element II

    Data Structures & Algorithms · Medium

    Given a circular integer array nums (i.e., the next element of nums[nums.length - 1] is nums[0]), return the next greater number for every element in nums.

    The next greater number of a number x is the first greater number to its traversing order next in the array, which means you could search in a circular way to find its next greater number. If it doesn't exist, return -1 for this number.

    Open the problem
  5. 05

    Maximum Sum of K Elements from Ends of Array

    Data Structures & Algorithms · Medium

    Given an array of integers arr and an integer k, you have to choose exactly k elements. These k elements must be chosen either from the beginning of the array, the end of the array, or a combination of both (some from the beginning and some from the end). Your goal is to maximize their sum.

  6. 06

    Remove Duplicates from String (Maintain Order)

    Data Structures & Algorithms · Easy

    Given a string, remove all duplicate characters from it while maintaining the original relative order of the remaining characters.

  7. 07

    Meeting Rooms II

    Data Structures & Algorithms · Medium

    Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required.

    For example, given [[0, 30],[5, 10],[15, 20]], you would need 2 rooms.

    Open the problem
  8. 08

    Kth Missing Positive Number

    Data Structures & Algorithms · Easy

    Given an array arr of positive integers sorted in a strictly increasing order, and an integer k.

    Return the kth positive integer that is missing from this array.

    Open the problem

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!