Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

Amazon
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I reached out to an Amazon recruiter on LinkedIn. She provided a job ID and asked me to apply for that position. After I applied, she called to discuss my experience and tech stack. Since my experience and skills aligned well with the role, she scheduled the interview rounds based on my availability.
Application story
I reached out to the recruiter with a cold message on LinkedIn. She replied and shared a job ID to apply for, mentioning that they would take it forward from there. After that, she asked for my availability and scheduled both rounds on the same day.
Why selected/rejected for the role?
I was rejected in the LLD round, where I received feedback that the class design and database schema could have been more optimized and better structured for the system the interviewer asked me to design. The interviewer also expected a better use of OOP concepts.
Preparation
Duration: 2 months
Topics: Data Structures, Low-Level Design, High-Level Design, Object-Oriented Programming, SOLID Principles, Leadership Principles
Tip
Tip

Tip 1: Focus on Trees.

Tip 2: Revise popular LLD questions (such as the Hotel Booking System, etc.).

Tip 3: The 14 Leadership Principles of Amazon are a must for every round of the Amazon interview.

Application process
Where: Other
Eligibility: No. Only experience and skill set need to match.
Resume Tip
Resume tip

Tip 1: Include projects on your résumé that highlight measurable results. For example, “Designed and developed an application handling over 500,000 users monthly” or “Increased system performance by 20%.”

Tip 2: Clearly mention the tech stack and tools used in your projects.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration115 minutes
Interview date1 Dec 2024
Coding problem2

Coding Challenge - 90 minutes, two coding problems.
Work Simulation -15 minutes, work through software development decisions faced by SDEs at Amazon.
Work Style Surveys - 10 minutes 2 surveys

1. Special Palindromic Sequence

Easy
0/40
Asked in company
Amazon

A string is defined as a "special sequence" if it can be partitioned into two non-empty contiguous substrings, s1 and s2, where both substrings satisfy a special palindromic property.


The property is as follows: a string is considered valid if, after removing at most one character from it, the resulting string can be rearranged to form a palindrome.


A string can be rearranged to form a palindrome if it has at most one character with an odd frequency. This means the original substring (before character removal) must have at most two characters with odd frequencies.


Your task is to determine if a given string S is a special sequence. If it is, return "Yes"; otherwise, return "No".


Problem approach

Step 1: Loop through all possible positions to split S into two non-empty substrings: left = S[:i] and right = S[i:], for i ranging from 1 to len(S) - 1.

Step 2: For each split, check both substrings.

Step 3: Count the frequency of characters in each substring.

Step 4: Count how many characters have an odd frequency.

Step 5: If the number of odd-frequency characters is ≤ 2, the substring can be rearranged into a palindrome after removing at most one character.

Step 6: If both substrings meet this condition for any split, return "Yes".

Step 7: If no such split exists, return "No".

Try solving now

2. System Charge Combination

Moderate
0/80
Asked in company
Amazon

You are given an array charge of size n, where charge[i] represents the charge value of a system.


You must remove all systems one by one until only a single system remains. The goal is to perform these removals in an order that maximizes the charge of this final remaining system.


The operation is defined as follows:


1) When you select and remove a system, its immediate left and right neighbors (if they exist) merge.


2) The new merged system has a charge equal to the sum of the charges of the two neighbors that were merged.


3) Systems at the ends of the current array (the first or last) cannot cause a merge when removed, as they only have one neighbor.


Your task is to find the maximum possible charge of the final system.


Problem approach

Step 1: Understand the Operation
Remove one element charge[i].

If i > 0 and i < n - 1, merge charge[i-1] and charge[i+1] into a new system with a charge of charge[i-1] + charge[i+1].

If i == 0 or i == n - 1, no merging takes place; simply remove the element.

After removal and any necessary merging, recalculate the total charge.

Step 2: Initialize the Result Variable
Let max_total_charge = -inf (or any sufficiently small number).

Step 3: Iterate Over Each Index i of the Array
For every index i in charge, simulate the result of removing the system at that index:

Case 1: i == 0 (first element)
new_array = charge[1:]
total = sum(new_array)

Case 2: i == n - 1 (last element)
new_array = charge[:-1]
total = sum(new_array)

Case 3: 0 < i < n - 1 (middle element)
Merge charge[i-1] + charge[i+1]
new_array = charge[0:i-1] + [charge[i-1] + charge[i+1]] + charge[i+2:]
total = sum(new_array)

After calculating the total charge for each removal, update max_total_charge if the value is higher.

Step 4: Return the Result

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date17 Dec 2024
Coding problem1

Timing: 11 AM – 12 PM

This was a virtual problem-solving round held on Amazon Chime. It began with introductions, followed by a question on Amazon Leadership Principles, then a coding question on trees, and finally another question on Amazon Leadership Principles.

1. Tree Level Width

Hard
0/120
Asked in company
Amazon

You are given a generic (n-ary) tree structure representing a hierarchy. The tree has N nodes, numbered from 0 to N-1. The structure is described by a parent array, where the i-th element denotes the parent of node i. The root of the tree is indicated by a parent value of -1.


Your task is to write a program that counts the number of nodes at each depth (or level) of the tree. The root is at depth 0, its children are at depth 1, and so on.


Problem approach

Used BFS.

Try solving now
03
Round
Medium
Video Call
Duration60 Minutes
Interview date17 Dec 2024
Coding problem1

Mode: Virtual
One LLD question and two Amazon Leadership Principles were discussed.

1. System Design

Create the Low-Level Design of a Stack Overflow system.

Problem approach

Tip 1: Watch videos of frequently asked LLD questions on YouTube.

Tip 2: Read Alex Xu’s materials/books.

Tip 3: Apply OOP concepts when creating classes while solving LLD problems.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Amazon
2446 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
2239 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 8 problems
Interviewed by Amazon
3375 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
911 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29892 views
8 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Dunzo
3164 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Samsung
2588 views
0 comments
0 upvotes