Amazon Interview Questions
Practice the exact questions companies are asking right now.
Retrieve First Active and Last Inactive Dates per User
Given a table activity that tracks user activities, write a SQL query to retrieve the first active date and last inactive date for each user. Table Sc...
Compute minimum passes over permutation
Question You are given an array shelf representing a permutation of the integers 1..n. Starting with target = 1, you repeatedly scan the array left-to...
Debug online worse than offline model performance
Production ML: online performance worse than offline You launch an ML model. Offline evaluation (validation/test) looked good, but after deployment th...
Implement PyTorch training loop
Implement a basic PyTorch training loop You are given a PyTorch neural network model, a DataLoader that yields (inputs, targets) batches, an optimizer...
Explain key ML theory and techniques
Onsite Machine Learning Engineer: Mixed Topics You are asked to answer concisely but with depth across the following topics: 1) XGBoost Parallel Compu...
Answer Amazon-style leadership deep dives
Behavioral / Leadership Prompt (Principal level) Prepare to answer deep-dive leadership questions with heavy follow-ups. Scenarios to cover - A failed...
Design a search relevance prediction approach
Search relevance prediction You are asked to predict relevance for an e-commerce search engine (given a user query and a product/document). Prompt 1. ...
Design a large-scale temperature sensor system
System design: large-scale temperature sensor collection and visualization Design a system to collect and display temperature data from a very large n...
Compute array products excluding self and top-k
Algorithms 1) Product of array except self (no division) Given an integer array nums of length n, return an array ans where: - ans[i] = product of all...
Design an S3-like object storage service
Design a cloud object storage service similar to Amazon S3. The service should allow clients to upload, store, and download large files reliably and e...
Select Top Customers Using Transaction Data Filters
transactions +----+---------+------------+--------+ | id | user_id | order_date | amount | +----+---------+------------+--------+ | 1 | 101 | 202...
Describe a recent innovation you delivered
Behavioral question: “Tell me about a recent innovation you delivered.” Include: - What problem/opportunity you identified - What was novel about your...
Find largest island area
Question Given a 2D grid of 0s and 1s, find the largest area of a connected group of 1s (island) using 4-directional adjacency; return that area. (Var...
Identify Top-Buying Customers Daily with SQL Query
PRIME +-------------+------------+----------+ | Customer_ID | Start_Date | End_Date | +-------------+------------+----------+ | 1 | 2025-01-...
Amazon PM Behavioral & Leadership Deep-Dive
PM Onsite Behavioral Interview Practice (Amazon) Context You're preparing for an onsite Product Manager interview. Answer the prompts below using the ...
Analyze Top Book Sales and Unique Customer Purchases
BOOK_TRANSACTION +---------------+------------+-------------+------+----------+ | MARKETPLACE_ID| TXN_DAY | CUSTOMER_ID | ASIN | QUANTITY | +------...
Identify Top-Buying Customers Daily with SQL Query
PRIME +-------------+------------+----------+ | Customer_ID | Start_Date | End_Date | +-------------+------------+----------+ | 1 | 2025-01-...
Evaluate actions in Amazon simulation
Amazon Work Simulation: Purpose, Modules, and Design Decisions Context and Assumptions The Work Simulation is a timed, scenario-based assessment used ...
Debug distributed-system performance problems
You are asked: “If a distributed system has a performance problem (latency/throughput regression), how would you approach it?” Describe a practical, s...
Design device telemetry pipeline for real-time and batch
Design a distributed system that ingests telemetry from millions of devices and supports both: - Real-time analytics (near-real-time dashboards/alerts...