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

SDE - 1

Amazon
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Journey
After completing my internship at Razorpay, I was eager to aim higher and challenge myself with bigger opportunities. I went back to the basics—revising DSA, polishing my understanding of core concepts, and practicing regularly on coding platforms. I also focused on improving my problem-solving approach rather than simply solving more questions. When the Amazon opportunity came through the online assessment, I put in my best effort and was thrilled to be shortlisted for the interview. Even though the final result didn’t go in my favor, the experience taught me a lot. The interview pushed me to think deeper, stay calm under pressure, and identify the exact areas I need to strengthen. This journey reminded me that every attempt, whether it ends in success or rejection, moves you forward. It made me more resilient, more focused, and better prepared for future opportunities.
Application story
I applied for the Amazon role through their official hiring portal after completing the online assessment. The OA included two coding questions and a behavioral section. Based on my performance, I was shortlisted for the interview. The process was smooth and well-structured — I received communication from HR regarding the interview slot, and the entire process from OA to interview was completed within a few days.
Why selected/rejected for the role?
I was rejected mainly because I couldn’t reach the optimal solution for the DSA problem asked during the interview. While my approach started well with a brute-force explanation, I struggled to derive the correct sliding-window logic. Amazon places strong emphasis on problem-solving depth and optimization, and not arriving at the ideal solution was the primary reason for my rejection. However, the experience helped me clearly understand my weak areas and motivated me to improve further.
Preparation
Duration: 2 Months
Topics: Data Structures, Algorithms, Sliding Window Techniques, Hashing & Maps, OOPS Concepts, Behavioral Questions (STAR Method)
Tip
Tip

Tip 1: Practice DSA consistently — even solving 1–2 quality problems daily builds strong intuition.

Tip 2: Revisit previously solved questions and focus on understanding optimal patterns like sliding window, two pointers, and binary search.

Tip 3: Prepare behavioral answers using the STAR method — Amazon strongly evaluates clarity, ownership, and leadership principles.

Application process
Where: Referral
Eligibility: Above 7 CGPA, (Salary Package: 45 LPA)
Resume Tip
Resume tip

Tip 1: Highlight impactful projects and mention measurable results wherever possible.

Tip 2: Keep the resume simple, clean, and honest — avoid adding anything you cannot explain confidently.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date10 Sep 2025
Coding problem2

Round 1 was an online OA consisting of two coding questions followed by a short behavioral section. The total duration was 75 minutes, during which I had to solve both coding problems. After completing the coding part, the OA concluded with a set of behavioral questions related to ownership, teamwork, and decision-making.

There was no live interaction in this round — everything was fully automated, and once the OA was submitted, the results were evaluated to determine whether I would move forward to the interview stage.

1. Fair Value Distribution

Easy
0/40
Asked in company
Amazon

You are the system architect for a new online gaming platform. You need to design an algorithm to distribute rewards to players based on their scores in a tournament.


You are given two lists:

- points: A list of the final scores for all n players. Multiple players can have the same score.

- values: A large pool of available reward items, each with a specific "value" (e.g., 100 gems, 200 gems).


The reward allocation must follow these strict rules to ensure fairness and prestige:

- Group by Score: All players with the same score must receive the same reward value.

- Consume Rewards: If k players achieve a certain score, you must assign them a reward value that is available at least k times in the values pool.

- Increasing Prestige: A higher score must always receive a reward with a strictly greater value than a lower score.

- Minimal Assignment: To conserve valuable rewards, you must always assign the smallest possible value that satisfies the rules above.


Your task is to return a list showing the reward value assigned to each player in the original points list. If a fair assignment is impossible, you should return an empty list.


Problem approach

Step 1 — Count frequencies of scores: traverse points[] and build a map cnt[score] = frequency.
Step 2 — Create a sorted list g of (score, need) pairs sorted by score ascending. This ensures we assign values in increasing score order (requirement for strictly increasing assigned values).
Step 3 — Count frequencies of values[] into an ordered map/multiset freq where keys are value buckets and values are available counts. Using an ordered map lets us quickly find the next value > prev.
Step 4 — Greedy assignment: maintain prev = -inf. For each (score, need) in sorted g:

Find the smallest val in freq such that val > prev and freq[val] >= need.

If found, decrement freq[val] by need, set pick[score] = val, and update prev = val.

If not found, assignment is impossible (handle gracefully).
Step 5 — Build result: for each original points[i], set ans[i] = pick[points[i]]. Return ans.

Why greedy works: assigning the smallest valid value for each score preserves maximum remaining large values for later (higher) scores and satisfies the strictly-increasing constraint.

Time & Space Complexity:

Counting and building g: O(n).

Sorting g: O(k log k) where k = # unique scores.

Using an ordered map for values and iterating: in worst case O(k * log m) where m = # unique values.

Overall roughly O(n + k log k + m log m). Space O(n + m).

Try solving now

2. Metro Transit Planner

Easy
0/40
Asked in company
Amazon

You are an engineer for a city's Metro Transit Authority, tasked with planning a maintenance route on the main circular subway line. The travel time between consecutive stations is not uniform due to track conditions.


You are given:

- An array trans of m travel times. trans[i] is the time it takes to go from station i+1 to station i+2. The final element, trans[m-1], is the time from station m back to station 1.

- An array req containing a sequence of stations that must be inspected in a specific order.


You start at Station 1. For each required inspection, you must travel from your current location to the next station in the req list. Since the track is circular, you can travel either clockwise or anti-clockwise. To be efficient, you must always choose the path that takes less time.


Your job is to calculate the total minimum time required to complete the entire sequence of inspections.


Problem approach

Step 1 — Build prefix sums pref[] over trans[] (1-indexed): pref[i] = sum(trans[0..i-1]). Total loop time total = pref[m].
Step 2 — Define helper cwDist(u, v) to compute clockwise distance from station u to station v using the prefix sums and modulo total arithmetic:

If stations are 1-indexed and u <= v: diff = pref[v-1] - pref[u-1].

Otherwise wrap-around: compute similarly and normalize. Use ((diff % total) + total) % total.
Step 3 — Iterate through req[] with current station cur = 1. For each next required station h:

Compute clockwise distance cw = cwDist(cur, h) and counter-clockwise distance ccw = total - cw.

Add min(cw, ccw) to ans.

Set cur = h.
Step 4 — Return ans.

Why it works: prefix sums give O(1) distance queries on the circular track; choosing min(cw, total-cw) ensures minimal travel per leg.

Time & Space Complexity:

Prefix sums: O(m).

For each required station, O(1) work; total O(|req|).

Space O(m) for prefix array.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date16 Oct 2025
Coding problem1

Timing: Afternoon (not late at night).
Environment: Calm, conversational, and professional — the interviewer encouraged me to explain my thought process.
Other significant activity: The round started with approximately 20 minutes of situational/behavioral questions about my Razorpay experience (challenges I faced, how I coped, and learnings). The remaining 40 minutes were devoted to a DSA problem and its discussion.
Interviewer behavior: Friendly, patient, and focused on understanding my approach and thinking rather than just the final code.

1. Longest Repeating Substring

Moderate
10m average time
90% success
0/80
Asked in companies
IBMMakeMyTripCIS - Cyber Infrastructure

You are given a string 'str' of length 'N'. You can perform at most 'k' operations on this string. In one operation, you can choose any character of the string and change it to any other uppercase English alphabet character.


Return the length of the longest substring containing same characters after performing the above operations.


For example :

Input:
str="AABC"  k=1

Output:3

Explanation: Replace 'B' with 'A', we will get "AAAC" and the longest substring with same character is "AAA" of length 3.
Problem approach

Stepwise — Optimal solution I should have given (and you can present):

Step 1 — Recognize pattern (sliding window + frequency):
We need the longest window [l..r] where we can change at most k characters to make all characters in the window identical. That means window_size - max_freq_in_window <= k, where max_freq_in_window is the count of the most frequent character inside the current window.

Step 2 — Maintain a sliding window:
Use two pointers l = 0, r = 0 and expand r across the string. Maintain a frequency array/map count[26] for characters and an integer maxf = maximum frequency in the current window (the highest count[c] among characters present).

Step 3 — Check window validity:
At every step, window size = r - l + 1. If window_size - maxf <= k, the window is valid — update global answer ans = max(ans, window_size).
If invalid (window_size - maxf > k), move l forward (count[s[l]]--) and shrink the window until it becomes valid.

Step 4 — Note about maxf maintenance:
maxf can be kept as the maximum frequency seen so far in the current window. When we increment count[s[r]], update maxf = max(maxf, count[s[r]]). It's safe to leave maxf possibly larger than the true current-window maximum on some shrink steps — the correctness still holds because the condition window_size - maxf <= k becoming false will force l forward; using this relaxed maxf still gives correct ans and keeps overall algorithm O(n). (Alternatively, recompute maxf occasionally at cost O(26) if strictness is preferred.)

Step 5 — Return the answer once r has scanned the string.

Complexity:

Time: O(n) — each r and l move at most n steps, and character map is O(1) (26 letters).

Space: O(1) — fixed-size frequency array (or O(alphabet) generally).

Try solving now

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
2969 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2219 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
1552 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
12553 views
2 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
5885 views
5 comments
0 upvotes