"FREE QUESTION BANK"
Draw a card.
Free interview questions, each with a hint and an explanation an editor has checked. Answer it yourself before you flip it.
free to readno sign-insource on every card
"LIVING LIBRARY"Updated — new questions added and verified regularly
/
Decks by role
"15 DECKS"On the table
Read any question
- Top two order amounts per customer, keeping ties
- Remove duplicates from a list but keep the original order
- Why did changing a copied dict also change the original?
- What happens when you iterate over a generator twice?
- Why do all these lambdas return the same number?
- What does a decorator do, and why use functools.wraps?
- In what order do try, except, else and finally run?
- Threads, processes or asyncio: which fits each of these jobs?
- Your mock.patch has no effect. Where should you patch?
- How do you pass user input to SQL safely from Python?
- What does mean(axis=0) return, and why isn't reshape a transpose?
- Largest sum of exactly k numbers in a row, negatives included
- Binary search with duplicates: how do you find the first match?
- Fewest links or least time: BFS or Dijkstra?
- How do you test a publishing rule without the database?
- You clear the cache on every update. Why does old data return?
- You scaled the data before the split. What went wrong?
- Design a chat app in 45 minutes. What do you do first?
- 80,000 daily users, 18 requests each. How many servers?
- A token bucket holds 5 tokens. Which of these requests pass?
- Your limit is 100 requests a minute. How did 200 get through?
- You add a server to a hash ring. Which keys move?
- R + W > N, yet reads return new data, then old. Why?
- Two offline edits to one note. Why not keep the latest?
- How do you make unique, sortable IDs on many servers?
- Two requests grab the same short code. What stops the clash?
- One slow site stalls your whole crawler. How do you fix it?
- How does a crawler avoid fetching the same page twice?
- A notification job is retried. How do you avoid a double send?
- Push or pull feeds when one account has 3 million followers?
- A chat app reconnects. Which messages should it ask for?
- Each shard sends its top 2 searches. Is the merge right?
- When can viewers start watching a just-uploaded video?
- Training loss keeps falling, validation loss rises. What's happening?
- L1 or L2: which one sets weights to exactly zero, and why?
- Your loss explodes after a few steps. What do you check first?
- Random forest or gradient boosting: what does each one fix?
- 99% accuracy on fraud data. Is the model any good?
- When does PR AUC tell you more than ROC AUC?
- Two models have the same AUC. Which probabilities do you trust?
- Your regression R² is negative. What does that mean?
- The same shoppers appear in train and validation folds. What breaks?
- Great offline AUC, poor online. Could a feature join leak?
- Same model, same user, different scores online. Where's the skew?
- Offline metric improved, but the A/B test is flat. Why?
- Dot product, cosine or L2: why do they pick different items?
- Why retrieve candidates before ranking, and which stage missed the item?
- Top results get more clicks. How do you correct for position?
- What does an LLM actually predict, and what does temperature change?
- Most water between two lines: why is moving the shorter line safe?
- Longest run after k replacements: why can the max count stay stale?
- Count subarrays that sum to k when numbers can be negative
- Your zero-rows-and-columns code wipes the whole matrix. Why?
- For each day, how many days until a warmer one?
- How do you keep a running median as numbers arrive?
- Meetings 9–10 and 10–11 fit one room. Why do you get two?
- Ship all packages in D days: what exactly do you binary search?
- Does this linked list loop? Answer with O(1) extra memory
- Can you take every course, and which ones stay blocked?
- Longest increasing subsequence: from O(n²) to O(n log n)
- Edit distance between two words: what does each table cell mean?
- Water spreads one cell a minute. When is every cell wet?
- All distinct orders of [1, 1, 2]: how do you avoid repeats?
- 0/1 knapsack in one array: why loop capacity downwards?
- Why does greedy coin change fail, and what fixes it?
- The agent has admin rights, the user is a viewer. What's allowed?
- Refunds need human approval. Where do you enforce that in an agent?
- A retrieved page says "ignore your instructions". What stops the agent?
- Your agent keeps calling the same tool. How do you stop it?
- Design a chatbot that answers from company docs. Walk me through it.
- The docs have the answer, but RAG misses it. Check the chunks?
- Vector search misses exact error codes. How do you fix retrieval?
- Multi-tenant RAG: filter by tenant before or after top-k?
- A RAG answer is wrong. Was it retrieval or generation?
- You changed the prompt. How do you know nothing got worse?
- The conversation no longer fits the context window. What do you cut?
- Users say the bot feels slow. Will streaming help?
- Three layers each retry 3 times. How many calls reach the model?
- Each call's p95 is 200 ms. What is the request's p95?
- Your app keeps flipping between the main and backup model. Why?
- Prompt caching is on, but the hit rate is zero. Why?
- Which of these list, set and deque operations are O(1)?
- Build a queue from two stacks. Why is it O(1) amortized?
- Design a stack that returns its minimum in O(1)
- Reverse a singly linked list in place without losing nodes
- Two keys share a bucket. How does a hash map cope?
- Why did your object vanish from a set after you changed it?
- Design an LRU cache with O(1) get and put
- Deep-copy a linked list whose nodes have a random pointer
- Is this tree a valid BST? Why checking children isn't enough
- Delete a BST key whose node has two children
- Preorder, inorder, postorder, level order: when do you use each?
- You insert sorted keys into a BST. Why does it get slow?
- Find the kth largest number: heap or quickselect?
- Delete a word from a trie without losing "car" or "cards"
- Edges arrive one by one. How many groups are there now?
- Adjacency list or matrix: which one for this graph?
- Which runs first, Promise callbacks or setTimeout?
- Why does a CSS class beat this ID selector?
- How do you stop stale search results overwriting newer ones?
- How should a modal dialog manage keyboard focus?
- Why is INP poor when LCP is good?
- Why does this React component fail to hydrate?
- How do you keep customers with no paid orders?
- Why can NOT IN return no rows?
- When should you filter with WHERE or HAVING?
- Why does joining payments and tickets inflate revenue?
- How do you count successes and unknowns in one query?
- How do you get one latest event per user?
- How do you reset a running total every month?
- How do you calculate day-one retention from repeated events?
- Process or thread: what changes for memory, crashes, and files?
- Why is virtual memory 2 GiB when RSS is 24 MiB?
- Why does Rust reject this handle code at compile time?
- Why does a shared counter lose updates across threads?
- Why do concurrent transfers deadlock, and how do you prevent it?
- Why can a reader see stale data behind a Relaxed flag?
- Why does a long-running service fail with EMFILE after hours?
- How does backpressure stop a fast producer from OOM-killing a service?
- Three roadmap bets want the same 6 weeks. Which ships first?
- Activation fell from 42% to 35%. What do you check first?
- Telemetry is missing before launch. Do you ship or wait?
- Half of new users quit step 3. What do you change?
- Four of five testers want a tooltip. Should you build it?
- A form shows red borders and a 3-second toast. What breaks?
- How do you answer: tell me about a technical disagreement?
- How do you talk about a real mistake you shipped?
- How do you give difficult feedback to a teammate?
- How do you describe mentoring a teammate without taking over?
- How do you delegate high-stakes work under time pressure?
- How do you communicate a missed deadline without losing trust?
- Why does a database check in livenessProbe crash healthy pods?
- API 5xx errors jump to 18%. What do you check first?
- 99.9% SLO over 30 days: how fast does your budget burn?
- When should a 5% canary trigger an automatic rollback?
- CI fails on an untouched branch. How do you debug it?
- How do you test a database backup before an outage hits?
- Why does state survive rotation on Android, yet vanish after backgrounding?
- Why does this Android coroutine keep running after leaving the screen?
- When should Android use WorkManager instead of a Foreground Service?
- Why does iOS lose unsaved form data without calling willTerminate?
- Why does a cancelled Swift Task still overwrite newer search results?
- Why can a @MainActor view model still freeze UI or race?
- How do you pick boundary values to catch off-by-one bugs?
- How do you test a state machine for forbidden transitions?
- How do API contract tests catch breaking response changes early?
- A test passes locally 10/10 but fails in CI 3/20. Why?
- Why do async UI assertions flake, and what replaces sleep?
- You have 45 minutes and a 6-hour suite. What runs?
- GET /invoices/{id} checks login. Why can another tenant read it?
- A user signed out. Why does their old JWT still work?
- How do you narrow an export worker with s3:* and db:admin?
- How do you rotate a webhook HMAC secret with zero downtime?
- A debug log leaked Bearer tokens. How do you log safely?
- A dependency upgrade passed CVE scans. Why can security still break?
- Which HTTP status code and error format fit each API failure?
- Why does OFFSET pagination duplicate or skip rows on live feeds?
- What must an API validate before request data hits business logic?
- How does an API handle retried POSTs with an Idempotency-Key?
- How do you evolve a JSON response without breaking live clients?
- How do you stop one slow dependency from crashing your API?
- Why does res.json() as Invoice let bad API data slip in?
- Why do separate UI booleans allow impossible screen states?
- Why does rows[idx].email type-check and still crash at runtime?
- Why does copying props into useState with useEffect cause bugs?
- Why does React StrictMode run useEffect twice, and what breaks?
- Why do tests of internal state and CSS classes fail refactors?
- Three dashboards report 4%, 12.5%, and 25% conversion. Which denominator wins?
- Why did a three-step funnel report 150% conversion? Fix the SQL.
- Mean weekly actions rose 20%, yet retention fell. What happened?
- Why do billing and analytics disagree on daily revenue?
- Your 50/50 A/B test split 51,200 vs 48,800. Do you ship?
- Conversion rose 4%, but 14-day retention fell 2.2 points. Ship?
- Why do 10-minute streaming windows drop late mobile events?
- Replaying yesterday's events doubled revenue. How do you make reruns safe?
- At-least-once delivery sent duplicate events. How do you deduplicate cleanly?
- How do you backfill 90 days into a live table safely?
- Which schema changes break pipelines, and how do you evolve safely?
- Upstream sent 40% NULL currencies. How do you block bad loads?
- Your bot passes 20 test prompts. Why does it fail users?
- Your eval passes 86%, yet users complain. What went wrong?
- Two raters agree on 90% of labels. Why is kappa 0.12?
- Four RAG answers look right. Which ones pass a grounding rubric?
- How do you score refusal when retrieved context lacks the answer?
- A small model costs 10x less. When does routing beat both?
- Substring search on repeating text: how does KMP skip ahead?
- Maximum non-overlapping intervals: which greedy sort order works?
- Dijkstra returns the wrong distance with a negative edge. Fix it
- Grid BFS with one wall break returns -1. Why?
- Why does a default list keep items from earlier calls?
- Why did this with block leak a lock and hide an error?
- Why did cancelling this asyncio task skip cleanup or break timeout?
- Why did a lazy iterator fail or read mutated data later?
- Why did our composite index still scan too many rows?
- Two withdrawals both read balance 100. How do you stop overdrafts?
- Why did UNIQUE(email, deleted_at) still allow duplicate active users?
- How do you split user events into sessions using LAG()?
- Which module should you split out of a monolith first?
- How do you migrate 40 million live rows with zero downtime?
- One big tenant slows 200 others. How do you isolate them?
- Which failover topology meets RPO 60s, RTO 5m, and 50ms writes?
- How do you pick a threshold when error costs differ?
- Feature PSI jumped to 0.34. Should you retrain the model?
- How do you size a human review band under queue limits?
- A 20-row subgroup drops to 80% precision. Should you block release?
- Why does inserting one RecyclerView row drop frames and kill animations?
- Why does this Compose LazyColumn recompose the whole screen on scroll?
- How do you design offline-first Android sync without losing edits?
- Why does this iOS view controller leak memory after popping?
- Why does SwiftUI reset view state on layout or parent updates?
- Why does a 50 MB iOS upload fail after screen lock?
- How do you push back on late scope before launch?
- How do you lead a vague project with conflicting goals?
- How do you unblock work when another team says next quarter?
- How do you run a blameless postmortem after a teammate's outage?
- How do you address repeated missed commitments early and fairly?
- How do you win time for tech debt over a feature?
- URL check blocks "localhost". Why can SSRF still hit cloud metadata?
- CORS blocks other origins. Why does CSRF still hit POST /account/email?
- Regex strips <script> tags. Why does XSS still run?
- Salted SHA-256 hashes passwords. Why can a leak still crack them?
- WHERE uses ? placeholders. Why is ORDER BY still SQL-injectable?
- Client set check_hostname = False for staging. What breaks in production?
- Why do two threads updating separate counters slow each other down?
- Why does an edge-triggered epoll handler stall mid-request?
- Why can an updated config file end up empty after power loss?
- Why does an outbound proxy hit EADDRNOTAVAIL after 47 seconds?
- Time in app jumped 22%, yet completion fell. What broke?
- Three pricing options promise higher Pro revenue. Which wins?
- Your data table reuses one spinner and 'No data'. What breaks?
- A dashboard shows 24 filters at once. How do you simplify it?
Difficulty is the editor's estimate, not a grade: one question can serve several roles and levels. Card colour comes from the topic; deck colour from the role family.