Software Engineer Interview Questions
Practice the exact questions companies are asking right now.
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...
Implement an in-memory file system
Implement an in-memory file system supporting basic directory and file operations. You must support the following methods (names are illustrative; any...
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...
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...
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...
Explain container image flow in CI/CD
Scenario Walk through what happens in a typical CI/CD pipeline that builds and deploys a containerized service. Questions 1. During CI, how is a conta...
Handle value conflicts and disagreeing with leadership
Behavioral / Values prompts Answer the following with specific examples (use the STAR method): 1. Have you ever made a decision that was “politically ...
Validate a JSON-like string
Problem You are given a string s that is intended to be a JSON text. Implement a function isValidJsonStructure(s) -> bool that checks structural valid...
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: ...
Explain virtual machines and concurrency basics
Topics Answer at a senior-engineer depth. Use diagrams or step-by-step reasoning as needed. 1) Virtual machines (VMs) - What is a VM and what problem ...
Implement streaming RLE and bit-packed codec
You are implementing a simple compression scheme for sequences of 32‑bit signed integers. The codec should support two encoding strategies: 1. Run‑Len...
Find median of merged RLE arrays
Problem You are given two run-length encoded (RLE) arrays A and B. Each is sorted by value in non-decreasing order. - Each element is a pair (value, f...
Design a payment processing system
Scenario Design a backend payment system for an online product that supports: - One-time charges and refunds. - Idempotent payment APIs (clients may r...
Compute courier pay and implement load balancing
Problem 1: Compute courier (delivery driver) pay You are given a sequence of delivery-related events for a courier during a day. Your task is to compu...
Design KV store with sliding-window average QPS
Problem Design an in-memory key–value store that supports mutation operations and can report the average QPS (queries per second) over a recent time w...
Design first-time Kubernetes deployment in new cloud
Scenario You need to stand up a new compute cluster on a new cloud account/subscription (greenfield). The team wants a simplified, practical plan for ...
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...
Calculate transaction fees from CSV records
You are given a CSV-like multi-line string representing transactions with columns: id,reference,amount,currency,date,merchant_id,buyer_country,transac...
Implement a persistent sharded key-value store
Problem Implement a simple key–value store that persists data on disk. You must store the data in fixed-size shards, where each shard is saved in one ...
Design a CI/CD system with stuck-job handling
Scenario Design a CI/CD platform similar to GitHub Actions/Jenkins that: - Triggers pipelines on events (e.g., push/PR/merge). - Runs pipelines as a D...