Amazon Interview Questions
Practice the exact questions companies are asking right now.
Design a cloud database write path and recovery
System Design (Engine-level): Write Path + Crash Recovery Design a core subsystem for a cloud-native relational database (Aurora-like) where compute i...
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...
Design a replicated cloud storage service
Design the internals of a cloud storage service (object/blob storage). Focus on storage/infra concerns rather than end-user features. Cover the follow...
Design a weighted random value generator
Weighted random value generator Design a generic component that stores values with integer weights and can return a random value with probability prop...
Explain inheritance, polymorphism, constructors, destructors
OOP fundamentals Answer the following concept questions and provide a small example where requested: 1. Inheritance vs. polymorphism - Explain what...
Design a computer-use agent end-to-end
Scenario You are designing a computer-use agent that can complete user tasks on a standard desktop environment by observing the screen and issuing act...
Print all odd numbers from an integer list
Problem Given a list/array of integers nums, print (or return) every odd number in the list, in the same order they appear. Clarifications / follow-up...
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...
Choose lock granularity for concurrent storage
You are implementing a component inside a storage engine that is accessed concurrently (e.g., an in-memory index, metadata cache, or block map). Discu...
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...
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 globally consistent metadata service
System Design Prompt Design a global-scale metadata service used by many internal products. Goals / Requirements - Writes must be strictly consistent ...
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...
Answer Dive Deep and Ownership in LP interview
Behavioral (Amazon LP): Dive Deep & Ownership The interviewer will probe your prior work and may connect follow-ups to the technical discussion. Promp...
Serialize and deserialize a binary tree
Problem Design two functions to serialize and deserialize a binary tree. - Serialize: convert a binary tree into a single string. - Deserialize: recon...
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. ...
Handle cold start, dropout, and training stability
Machine Learning deep dive Answer the following conceptual questions (you may use equations and small examples). A) Recommender systems: cold start 1....
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...
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...