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...
Explain KV cache in Transformer inference
Question In Transformer-based language model inference, what is a key-value (KV) cache? Explain: - What gets cached (tensors, shapes at a high level) ...
Compute ads revenue by geography in SQL
You have ad delivery logs for a shop-ads system. Tables ad_impressions - impression_id STRING (PK) - ts TIMESTAMP (UTC) - user_id STRING - shop_id STR...
Design a RAG system with evaluation
Scenario You are asked to design a Retrieval-Augmented Generation (RAG) system that answers user questions using a private corpus (e.g., internal docs...
How to evaluate similar-listing notifications feature
Case study (Marketplace product analytics) Context: Circle is a US marketplace app for buying and selling second‑hand products. On a product listing p...
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...
How predict vehicles’ turn direction at intersection?
At an intersection, there are N vehicles stopped or moving slowly. For each vehicle you have historical time-series data up to the current time: - Pos...
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...
Compute pirated-theme usage and revenue loss
You work on a theme marketplace. Some shops install pirated themes instead of paying for official themes. Assume all timestamps are in UTC. Tables sho...
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: ...
Compute probability an account is fake
A platform uses an automated classifier to flag potentially fake accounts. Assume: - Base rate: 2% of accounts are fake. - The classifier flags a fake...
Evaluate new shop-ads ranking algorithm
You work on a marketplace with shop ads. A new ranking/recommendation algorithm is proposed to promote shop ads more aggressively, but stakeholders ar...
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...