104 live scenarios
Technical Interview Practice Library
Easy Scenarios
3 challengesValidate Nested Bracket Sequences
Given a string containing round, square, and curly brackets, determine whether every bracket is properly opened and closed in the correct nested order.
Find a Pair Matching a Target
Given a sequence of integers and a target value, return the positions of two distinct entries whose values add to the target.
Design a URL Shortener
Design a scalable service like tinyurl.com that redirects short aliases to long URLs.
Medium Scenarios
55 challengesDesign an Ad Click Aggregator
Design a system to track ad clicks and aggregation for real-time analytics and billing.
Design a Cross-Product Tagging System
Design a shared tagging service that lets users apply tags to entities across multiple Atlassian products, with consistent search and deduplication.
Design a Work-Item Time Metrics Microservice
Design a microservice within a project-management platform that computes time-in-state and SLA metrics from work-item state history.
Design Typeahead
Design the search autocomplete system for Google Search.
Cheapest Route Within a Stop Limit
Given one-way routes between cities each with a cost, find the cheapest total cost from a source city to a destination city using at most k intermediate stops.
Minimum Coins to Reach an Amount
Given a set of coin denominations and a target amount, find the minimum number of coins (with unlimited supply of each denomination) needed to make exactly that amount, or report it is impossible.
Determine a Valid Course Completion Order
Given a number of courses and a list of prerequisite pairs, determine a valid order to complete all courses, or report that no valid order exists.
Build a Courier Payout Service
Design and implement the service that calculates courier payouts from order activity and upstream timing data.
Design Date-Range File Storage
Design a file storage and indexing system that returns exactly the files created within a requested time interval.
Design Search Autocomplete
Design a scalable typeahead system for a search engine like Google or Amazon.
Design Slack
Design a real-time messaging platform for enterprises.
Maximum Sum Contiguous Subarray
Given a non-empty list of integers, find the maximum sum of any contiguous non-empty subarray, with follow-up discussion of returning indices and handling a streaming variant.
Group Words by Letter Composition
Given a list of lowercase words, group together the words that share the exact same multiset of letters.
Design a No-Signup Media Hosting Service
Design a small image, GIF, and video hosting platform that lets users upload and share media without creating an account.
Design a Hotel Reservation System
Design a system like Airbnb or Booking.com where users can search for and book rooms for specific date ranges.
Build Idempotent Request Replay
Build a processor that consolidates duplicate JSON requests and guarantees each logical request is handled once.
Count Connected Land Regions in a Grid
Given a 2D grid of land and water cells, count the number of distinct connected land regions, where cells are connected horizontally or vertically.
Design a Leaderboard
Design a real-time gaming leaderboard (e.g., ESPN, Steam, MMOs).
Longest Strictly Increasing Subsequence
Given a sequence of integers, find the length of the longest subsequence (not necessarily contiguous) whose elements are strictly increasing.
Longest Run of Non-Repeating Characters
Given a string, find the length of the longest contiguous substring in which no character repeats.
Merge Overlapping Room Bookings
Given a list of room booking intervals, each with a start and end time, merge all overlapping or touching intervals into the minimal set of consolidated bookings.
Minimum Worst-Case Drops with Two Bulbs
Given two identical bulbs and a building with F floors, return the minimum number of drops needed in the worst case to guarantee identifying the critical threshold floor.
Track Connectivity Across a Growing Network
Given a number of servers and a sequence of direct connection events between pairs of servers, answer whether two given servers are connected after each event, processing many union and query operations efficiently.
Design a Notification System
Design a scalable notification service that sends emails, SMS, and push notifications to millions of users.
Design an Airline Management System
Design an airline domain model covering airports, aircraft seat layouts, scheduled flights versus dated flight instances, passengers, reservations and tickets, seat assignment, and flight status transitions.
Implement an In-Memory Rate Limiter
Design and implement an in-memory rate limiter as an object-oriented TypeScript module, with handwritten tests and discussion of concurrency considerations.
Design an ATM Transaction Engine
Design an ATM that authenticates a card and PIN, and supports balance inquiry, cash withdrawal with denomination dispensing, and deposits, including session/state handling and hardware abstractions.
Design Blackjack and a Deck of Cards
Design a reusable deck of cards and a single-round Blackjack game: cards, suits and ranks, deck shuffle/deal, hand scoring with flexible ace values, player and dealer turns, and terminal outcomes (blackjack, bust, win/lose/push).
Design a Power Plant Electricity Allocator
Design a class-level system modeling a power plant that distributes electricity to multiple neighborhoods, each with a stated demand, subject to the plant's total capacity.
Design a Car Rental System
Design a car rental domain model covering vehicle categories and vehicles, branches, customers and drivers, a rental date range, rate-based quotes, reservations, pickup rental agreements, and return inspection with extra charges — preventing overlapping rentals of the same vehicle.
Design a Group Expense-Splitting Ledger
Design a system where users form groups, log shared expenses using pluggable splitting strategies (equal/exact/percentage), maintain pairwise balances, and settle debts.
Design a Hotel Management System
Design a hotel domain model covering room types and rooms, guests, a half-open date-range value object, the reservation lifecycle, room assignment, check-in/out, and a charges folio, while preventing overlapping bookings on the same room.
Design a Library Management System
Design a library that models catalog titles versus physical copies, members and librarians, checkout/return/renew/reserve flows with loan due dates, an overdue fine policy, and notifications as a boundary.
Design a Meeting Room Booking System
Design a class-level system for booking meeting rooms: register a room, book a meeting given a start time and duration, and cancel an existing meeting with correct conflict detection.
Design an Online Shopping System
Design an online shopping domain model covering the product catalog, SKU inventory, shopping cart, order lines with snapshotted prices, a checkout flow, a payment boundary, and shipment state transitions.
Design a Multi-Floor Parking Lot
Design a parking lot that assigns compatible spots across multiple floors, issues tickets, tracks capacity, and calculates payment when vehicles exit.
Design a Professional Networking Platform
Design a professional networking domain model covering members and profiles (experience/education), connection requests and undirected connections, and posts with comments and reactions, enforcing symmetric connections, no self-connection, unique pending requests, and profile-edit authorization.
Design a Question and Answer Platform
Design a Q&A platform domain model with users, questions, answers, comments, tags, votes, an accepted-answer rule, and a reputation policy, with the voting, acceptance, and reputation invariants enforced in the model.
Design a Restaurant Management System
Design a restaurant domain model covering tables and capacity, reservations for time slots, seated parties, a menu, orders with priced line items, kitchen status, and bills with payments, keeping booking and order/kitchen state transitions correct.
Design a Multi-Device Smart Home Controller
Design an application that controls multiple smart-home device types (e.g., fan, TV) supporting generic ON/OFF commands common to all devices plus device-specific commands, extensibly.
Design a Social Networking Platform
Design a social networking domain model covering users and profiles, friendship requests and symmetric friendships, and posts with a visibility policy, comments, and reactions — enforcing symmetric friendship, unique requests, author ownership, and visibility-based read authorization.
Design a Vending Machine Controller
Design a vending machine that manages inventory, accepts money, supports product selection and cancellation, returns change, and enforces a clear transaction state machine.
Design a Rate Limiter
Design a service to limit the number of requests a user can send to an API within a time window.
Reverse a Segment of a Linked List
Given the head of a singly linked list and two positions m and n, reverse the nodes from position m to position n in place and return the new head.
Design an Expense Management System
Model the core domain objects, state transitions, approval policies, and audit history for an employee expense management system.
Design a Role-Based Password Validator
Design an extensible validator that applies different password policies to regular users, administrators, and super administrators.
Search in a Rotated Sorted Array
Given an array of distinct integers that was originally sorted ascending and then rotated at an unknown pivot, determine the index of a target value or report that it is absent.
Design a Rare Book Condition Management System
Model the core domain objects for tracking physical condition assessments of rare library books, with immutable scan history and structured condition report generation.
Minimum Time for Contamination to Spread
Given a grid where each cell is empty, clean, or already contaminated, find the minimum time for all clean cells to become contaminated, spreading one step per unit time to adjacent cells, or report it is impossible.
Count Contiguous Runs Summing to a Target
Given a sequence of integers (possibly negative) and a target sum, count how many contiguous subarrays sum exactly to the target.
Partition a Set into Two Equal-Sum Groups
Given a set of distinct positive integers, determine whether it can be partitioned into two groups with equal sums.
Maximize Sum with No Adjacent Elements
Given a list of integers, find the maximum sum you can obtain by choosing elements such that no two chosen elements are adjacent in the list. You may choose no elements, so the answer is 0 for an empty list or when every choice would reduce the sum.
Currency Conversion via Exchange Rate Graph
Given a list of direct exchange rates, find the effective conversion rate between any two currencies by multiplying rates along a path in a directed graph.
Validate the Binary Search Tree Property
Given the root of a binary tree, determine whether it satisfies the binary search tree ordering property across every subtree, not just immediate parent-child pairs.
Prefix Lookup Service for a Word Dictionary
Given a dictionary of words, build a structure that can efficiently count how many dictionary words start with a given prefix.
Hard Scenarios
46 challengesDesign Context and Memory for a Long-Running Agent
Design context curation, compression, retrieval, and durable memory for agents operating across many hours and context windows.
Design an Evaluation Platform for AI Agents
Design datasets, trace grading, simulation, regression detection, and release gates for non-deterministic tool-using agents.
Design a Multi-Tenant LLM Inference Platform
Design a global inference service for mixed chat, coding, and long-context workloads across heterogeneous accelerators.
Design Anonymous Group Messaging
Design a group messaging application where each member has a different masked identity in every group.
Architecture Deep Dive on Your Past Project
Defend the architecture of a real project you built, its constraints, trade-offs, failures, and how you would redesign it today.
Design a Chat Application
Design a real-time chat application like WhatsApp or Facebook Messenger.
Design Google Docs
Design a real-time collaborative document editor supporting multiple simultaneous users.
Design Amazon DynamoDB
Design a highly available, scalable, leaderless key-value store.
Design Discord Voice
Design a low-latency voice chat system for gamers.
Design Dropbox
Design a cloud file synchronization service.
Design Bigtable
Design a distributed wide-column NoSQL store.
Design Google Maps
Design a mapping service with route planning and ETA calculation.
Design Instagram Feed
Design a photo-sharing social network news feed with complex ranking.
Design TikTok Algo
Design a high-velocity video recommendation feed (For You Page).
Design Uber Surge Pricing
Design a dynamic pricing engine for a ride-sharing service.
Design a Distributed File System
Design a file storage and synchronization service like Google Drive, Dropbox, or HDFS.
Design a Fault-Tolerant Distributed LLM Training Platform
Design the training stack for a 100B+ parameter model across tens of thousands of accelerators.
Design a Distributed Message Queue
Design a high-throughput distributed message queue similar to Apache Kafka or RabbitMQ.
Design a Shared GPU Cluster Scheduler
Design scheduling and capacity management for training, research, and production inference on a large heterogeneous accelerator fleet.
Design Job Scheduler
Design a distributed job scheduler capable of handling recurring and one-time tasks at scale.
Design a Key-Value Store
Design a distributed key-value store like Dynamo or Cassandra with high availability.
Design an LLM Inference Performance Optimization Program
Design the measurement, kernel, rollout, and correctness system that closes the gap between theoretical and achieved inference throughput.
Design Reliable Software Updates for a Mars Rover
Design a system that transfers a large software update over an intermittent, low-bandwidth link and safely activates it on a remote rover.
Track the Median of a Growing Stream
Design a structure that supports inserting numbers one at a time from a stream and efficiently reporting the median of all numbers seen so far.
Design a Merchandise Ranking Backend
Design a browsing backend that ranks merchandise using views, cart additions, wishlists, and purchase events.
Design a Political Advertising Safeguard System
Design a system to detect and prevent political advertisements from unauthorized foreign actors from appearing on a social media platform.
Design a Metrics Monitoring System
Design a high-volume system to ingest, store, and visualize metrics from large server fleets, similar to Datadog or Prometheus.
Design a Multi-Agent Research System
Design an orchestrator-worker agent system for open-ended research with parallel search, synthesis, citations, and bounded cost.
Design Multi-Tenant Vehicle Tracking
Design a shared real-time vehicle tracking platform used by ride-hailing, food delivery, and fleet-management products.
Design a Two-Player Chess Game Engine
Design a chess engine that models a board and pieces, validates legal turns and moves, records move history, and detects check, checkmate, stalemate, resignation, and forfeit.
Design a Cricket Information Platform
Design a cricket scoring domain model covering teams and players, a match, innings, overs and deliveries, batting and bowling scorecards, extras and wickets, striker rotation, over completion, and match results for a configurable limited-overs format.
Design a Multi-Elevator Dispatch System
Design a controller for multiple elevators that accepts hall and cabin requests, schedules cars, models movement and doors safely, and supports replaceable dispatch policies.
Design a Movie Ticket Seat Booking System
Design a multi-theater ticket booking system where users search movies/showtimes, pick specific seats from a shared seat map, and complete a reservation with correctness under concurrent booking attempts.
Design an Online Stock Brokerage System
Design a brokerage domain model covering accounts and portfolios, instruments, a cash ledger, market and limit orders, immutable fills, derived positions, order state transitions, and an external exchange gateway boundary — without building a matching engine.
Design a Payment System
Design a reliable payment processing backend like Stripe or PayPal. Focus on correctness and idempotency.
Design Proximity Service
Design a location-based service like Yelp, Uber, or Google Maps Nearby.
Design Ride Sharing (Ober)
Design a ride-matching service like Uber or Lyft with real-time location tracking.
Design a Secure Cloud Coding Agent
Design isolated execution, permissions, credentials, networking, and auditability for an autonomous coding agent.
Fewest Moves to Solve a Sliding Tile Puzzle
Given a small 2-by-3 sliding tile puzzle board with one blank space, find the minimum number of adjacent tile slides needed to reach a specified target arrangement, or report it is unreachable.
Maximum Value in Every Sliding Window
Given an array and a window size k, return the maximum value within every contiguous window of size k as it slides from left to right across the array.
Design a Stock Exchange
Design an exchange that accepts orders, matches buyers and sellers, publishes market data, and preserves an auditable sequence of trades.
Design a Ticket Booking System
Design a high-concurrency ticket booking system (e.g., Ticketmaster) that can sell out millions of tickets in minutes without overselling.
Design Twitter Feed
Design a scalable news feed system where users can post tweets and follow other users.
Design Product Discovery Inside Video
Design a system that identifies products in video frames and surfaces relevant purchase links while viewers watch.
Design a User-Uploaded Video Streaming Platform
Design upload, transcoding, storage, and playback for a global user-uploaded video platform.
Design a Web Crawler
Design a scalable web crawler like Googlebot to index the internet.
