Amazon | SDE-2 (Contract - 1 Year) | Hyderabad | Online Assessment
Summary
I applied for an SDE-2 contract role at Amazon in Hyderabad, completed a DSA coding round, a Spring Boot debugging task, and other assessments, but was rejected.
Full Experience
Role: SDE-2, Full-Time Contract (1 year, direct Amazon payroll) Process: I did cold email to hiring manager for potential openings. Next day got a call from an Amazon recruiter, followed by an official OA invite email.
Total Experience: 3.8 YOE in Java Backend Leetcode Stats: 1000+ problem solved till 2024. Not much active recently.
1. DSA Coding - 40 minutes
You are managing an inventory system at Amazon. You receive N bids from customers in the format [customerId, bidAmount, quantity, bidPlacedAt].
Allocate inventory to customers with these rules:
- Customers with a higher bid amount get priority.
- If multiple customers have the same bid amount, allocate inventory round-robin among them (1 item per customer per cycle) until inventory runs out or their bid is fully satisfied.
Return the list of customer IDs whose bids are not fully fulfilled.
Example 1:
b ids = [[1,3,1,1],[2,4,2,2]]
totalInventory = 1
output: [1]
Explanation: customer 2 has the higher bid amount, so gets priority and takes the only unit; customer 1's bid goes unfulfilled.
Example 2:
bids = [[1,3,2,1],[2,3,2,2],[3,3,1,3]]
totalInventory = 4
output: []
Explanation: all customers bid the same amount, so inventory is allocated round-robin: cycle 1 gives 1 unit each to customers 1, 2, and 3 (3 units used, 1 remaining). Cycle 2 gives the last unit to customer 1, since they still need more and are next in the round-robin order. Final allocation: customer 1 gets 2, customer 2 gets 2, customer 3 gets 1.
Ran out of time - Partial Test cases passed
2. Spring Boot Debugging/Fix - 60 minutes
Problem Statement: There is a movie rating system with an API to retrieve movies based on multiple filters - celebrity, director, minRating, maxRating, popularity, and title.
The API was not returning correct data as per the requirements. The task was to identify the root cause and fix it, so that all provided unit tests pass.
Ran out of time - Partial Test cases passed
3. Work Simulation - 15 minutes
4. Work Style Survey - 10 minutes
Outcome - Rejected
Interview Questions (1)
Inventory Allocation based on Bids
You are managing an inventory system at Amazon. You receive N bids from customers in the format [customerId, bidAmount, quantity, bidPlacedAt].
Allocate inventory to customers with these rules:
- Customers with a higher bid amount get priority.
- If multiple customers have the same bid amount, allocate inventory round-robin among them (1 item per customer per cycle) until inventory runs out or their bid is fully satisfied.
Return the list of customer IDs whose bids are not fully fulfilled.
Example 1
bids = [[1,3,1,1],[2,4,2,2]]
totalInventory = 1
output: [1]
Explanation: customer 2 has the higher bid amount, so gets priority and takes the only unit; customer 1's bid goes unfulfilled.
Example 2
bids = [[1,3,2,1],[2,3,2,2],[3,3,1,3]]
totalInventory = 4
output: []
Explanation: all customers bid the same amount, so inventory is allocated round-robin: cycle 1 gives 1 unit each to customers 1, 2, and 3 (3 units used, 1 remaining). Cycle 2 gives the last unit to customer 1, since they still need more and are next in the round-robin order. Final allocation: customer 1 gets 2, customer 2 gets 2, customer 3 gets 1.
Preparation Tips
I cold‑emailed the hiring manager, studied a large number of LeetCode problems (1000+ solved), and reviewed Java backend concepts and Spring Boot fundamentals before the interview.