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 reccently.
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:
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]
Explaination: 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: []
Explaination: 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 casses passsed
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 casses passsed