Amazon Interview Questions
- DSA
- LLD
- HLD

Q1: Sort Colors
Given an array nums with n objects colored red, white, or blue, sort them in place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. Use integers 0, 1, and 2 to represent red, white, and blue respectively. Do this without using the library’s sort function.
Q2: Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. Assume each input has exactly one solution, and you cannot use the same element twice.
Q3: Detect Cycle in a Linked List
Determine if a singly linked list has a cycle in it. Use Floyd’s Tortoise and Hare algorithm to detect the cycle efficiently.
Q4: Merge Two Sorted Arrays
Given two sorted arrays, merge them into a single sorted array in O(n) time using a two-pointer technique.
Q5: Longest Substring Without Repeating Characters
Find the length of the longest substring without repeating characters in a given string.
Q6: Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Q7: N-ary Tree Level Order Traversal
Traverse an N-ary tree by levels and return the list of values for each level. Added complexity: find two employees at the same level but different managers as a variation.
Q8: Merge K Sorted Arrays
Merge multiple sorted arrays or lists into one sorted list using efficient merge algorithms like Min Heaps or Divide and Conquer Merge Sort.
Q9: Concurrency String Problem
Optimize concurrent string operations, often requiring careful handling of race conditions or efficient parallel execution strategies.
Q10: Backtracking & Graph Traversal Problems
Solve problems involving backtracking on trees or graphs, often with constraints to optimize performance.
Q1. Design a Parking Lot System
Design a system managing parking lot operations such as parking and exiting vehicles, tracking available slots, and calculating charges. Key aspects include object-oriented design with classes representing vehicles, parking spots, and the parking lot itself.
Q2. Design a Movie Ticket Booking System
Implement a system to book movie tickets, handling seat selection, availability, cancellations, and payments with classes representing movies, shows, seats, and user bookings.
Q3. Design a Library Management System
Develop a system to manage books, members, borrowing, returns, and fines. Consider classes like Book, Member, Librarian, and Catalog, implementing various interactions.
Q4. ATM Design
Design a comprehensive ATM system including withdrawal, deposit, balance checking, synchronization, and extensible design patterns like state and command patterns.
Q5. Parking Lot System Design
Model classes and interactions to manage vehicles, parking slots, entry/exit barriers, and related transactions.
Q6. API Contract & Database Modeling
Define API contracts and efficient DB schema designs that facilitate maintainable and scalable software, usually aligned with distributed system design principles.
Q1. Design a Content Delivery Network (CDN)
Create an architecture to deliver web content globally with low latency by caching content on edge servers. Address cache invalidation, load balancing, fault tolerance, and scalability considerations.
Q2. Design an E-commerce Website like Amazon
Architect a scalable e-commerce platform supporting product catalogs, user accounts, shopping carts, orders, payments, and recommendations. Focus on modular components, database design, microservices, and fault tolerance.
Q3. Design a URL Shortening Service
Build a URL shortener to convert long URLs into shorter ones with features such as link redirection, expiration, analytics, and scalability.
Q4. Design a Video Streaming Service like Amazon Prime
Create a scalable system for streaming video content with features like content delivery, user management, digital rights management (DRM), and adaptive streaming.
Q5. Video Streaming Platform
Design a system that supports uploading, streaming, liking, commenting, edge caching, API gateway, CDN integration, and adaptive streaming.
Q6. E-commerce System Design
Outline a scalable platform architecture with product catalog, order processing, payment, recommendation engines, and fault tolerance.
Q7. Distributed Job Scheduling System
Design a system handling distributed background jobs, event-driven workflows, failure handling, and high availability.
Q8. URL Shortening Service
Implement a scalable service converting long URLs to short codes with expiry, analytics, and redirection.