Amazon Interview Questions

Prepare for success with our curated collection of interview questions. Designed to help students practice and build confidence, these questions cover a range of topics and real-world scenarios to get you ready for your next interview.
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.

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.

Determine if a singly linked list has a cycle in it. Use Floyd’s Tortoise and Hare algorithm to detect the cycle efficiently.

Given two sorted arrays, merge them into a single sorted array in O(n) time using a two-pointer technique.

Find the length of the longest substring without repeating characters in a given string.

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.

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.

Merge multiple sorted arrays or lists into one sorted list using efficient merge algorithms like Min Heaps or Divide and Conquer Merge Sort.

Optimize concurrent string operations, often requiring careful handling of race conditions or efficient parallel execution strategies.

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.

Implement a system to book movie tickets, handling seat selection, availability, cancellations, and payments with classes representing movies, shows, seats, and user bookings.

Develop a system to manage books, members, borrowing, returns, and fines. Consider classes like Book, Member, Librarian, and Catalog, implementing various interactions.

Design a comprehensive ATM system including withdrawal, deposit, balance checking, synchronization, and extensible design patterns like state and command patterns.

Model classes and interactions to manage vehicles, parking slots, entry/exit barriers, and related transactions.

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.

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.

Build a URL shortener to convert long URLs into shorter ones with features such as link redirection, expiration, analytics, and scalability.

Create a scalable system for streaming video content with features like content delivery, user management, digital rights management (DRM), and adaptive streaming.

Design a system that supports uploading, streaming, liking, commenting, edge caching, API gateway, CDN integration, and adaptive streaming.

Outline a scalable platform architecture with product catalog, order processing, payment, recommendation engines, and fault tolerance.

Design a system handling distributed background jobs, event-driven workflows, failure handling, and high availability.

Implement a scalable service converting long URLs to short codes with expiry, analytics, and redirection.

WhatsApp Icon

Hi Instagram Fam!
Get a FREE Cheat Sheet on System Design.

Hi LinkedIn Fam!
Get a FREE Cheat Sheet on System Design

Loved Our YouTube Videos? Get a FREE Cheat Sheet on System Design.