Software Engineer Interview Questions
Practice the exact questions companies are asking right now.
Design a coffee ordering system
System Design: Coffee Ordering System Design a system for a coffee shop (or chain) that supports ordering drinks. Core use cases - Customer browses me...
Implement an in-memory database with TTL and backup
In-Memory Database (Levels 1–4: TTL and Backup/Restore) Implement an in-memory database that stores records identified by a string key. Each record co...
Design a single-node persistent in-memory cache
Scenario Design a single-machine cache used by a web service to handle read/write requests. The cache should: - Store key/value pairs in memory (fast ...
Design a sandboxed cloud IDE
System design: Sandboxed cloud IDE (Colab-like) Design a multi-tenant, browser-based cloud IDE/notebook that lets users run code in an isolated sandbo...
Implement an in-memory SQL-like table
Problem Implement a simple in-memory database for one table. All values are strings. Each row is identified by a rowKey (string). Each row contains co...
Design an ads audience targeting system
Problem Design an ads audience targeting system that allows advertisers to upload large user lists and then target (or exclude) those users when servi...
Design a distributed crossword fill solver
Scenario You are building a service that fills a crossword-like grid with words. - The board size is not specified; assume a medium board around 50×50...
Implement credit ledger with out-of-order timestamps
Problem You are implementing a GPU credit ledger that supports adding credits, charging credits, and querying balances. Requests can arrive in any tim...
Implement multi-level task manager APIs
You are implementing an in-memory task management system with a set of APIs that evolve over 4 levels. All APIs receive a timestamp: int parameter. Un...
4.2 Design a Collaborative Document Editor
Real-time collaborative editing is one of those features that feels magical when it works — and absolutely nightmarish to build from scratch. Google D...
Implement toy-language types and generic substitution
Problem: Toy Language Type System (Printing + Generic Resolution) You are implementing a small type system for a custom “Toy Language”. Types can be: ...
Dedupe titles in per-shelf viewport
You are rendering a streaming app home page. - The home page consists of shelves displayed from top to bottom. - Each shelf contains a list of titleId...
Design centralized log ingestion and query system
Problem Design a system to collect, transmit, store, and query application/data logs from many services/hosts into a central data center database. Req...
Implement a memory allocator with malloc/free
Problem You are implementing a simplified memory allocator over a contiguous memory region. Initialize the allocator with a fixed total size: - alloca...
Find path in implicit Fibonacci tree
You are given a special family of binary trees called Fibonacci trees. The k‑th order Fibonacci tree T(k) is defined recursively: - T(1) is a single n...
Simulate turn-based monster team battle
Design an object-oriented model and implement the core battle logic for a turn-based fight between two teams of monsters. The system should simulate t...
Design a distributed web crawler
Problem Design a web crawler that starts from one or more seed URLs and continuously discovers and fetches pages. Requirements - Inputs: One or more s...
Count business days excluding holidays
Problem: Count Working Days Between Two Dates Given a start date, an end date (inclusive), and a set of holiday dates, compute the number of working d...
Design a donation service for a 3‑day charity
System Design Prompt You are designing an online donation service for a 3-day charity campaign. Requirements - Donors can: - Select a charity campai...
Implement cursor-based query pagination
You are building a small in-memory database that stores rows with the following fields: - id (string, unique) - score (integer) - payload (string) You...