Interview questions with answer breakdowns — Page 48 of 52

Browse page 48 of Offer.cc interview question and answer breakdowns with reasoning, implementation details, follow-ups, and public sources.

BackendHard

Backend Interview: How Should Timeouts, Retries, and Circuit Breakers Work Together?

Design synchronous dependency calls with an end-to-end deadline, a failure-semantics matrix, and a retry budget, then contain cascading failures with circuit breakers, bounded probes, and fault injection.

Open the question and answer
DataHard

Data Engineering Interview: How Do You Safely Backfill Large-Scale Historical Data?

Split a 180 TB recomputation into recoverable partitions, then protect the live pipeline with deterministic inputs, isolated resources, delta catch-up, validation gates, and a versioned cutover.

Open the question and answer
CodingHard

Coding interview: Implement a work-stealing scheduler

Build per-worker deques with local LIFO and remote FIFO stealing, then reason about shutdown, idleness, fairness, and duplicate execution.

Open the question and answer
System designHard

System Design Interview: How Would You Design a Personalized News Feed?

Design a personalized news feed around candidate generation, hybrid fan-out, staged ranking, stable pagination, authorization filtering, and recovery from celebrity hotspots and eventual consistency.

Open the question and answer
BackendHard

Backend Interview: How Do You Diagnose and Fix the N+1 Query Problem?

Detect query counts that grow linearly with page size, compare JOIN and select-in batch loading, and verify the fix without hiding overfetching or consistency changes.

Open the question and answer
DataHard

Data Engineering Interview: How Do You Diagnose and Fix Spark Data Skew?

Prove Spark data skew with the UI, execution plan, and key distribution, then choose AQE, broadcast, targeted join salting, or two-stage aggregation and verify both correctness and performance.

Open the question and answer
CodingHard

Coding interview: Implement per-key request coalescing (singleflight)

Implement in-flight deduplication by key with shared results, retry after failure, race-safe cleanup, and explicit cancellation semantics.

Open the question and answer
System designHard

System Design Interview: Design Consistent Hashing with Virtual Nodes

Derive a hash ring from modulo remapping, then design consistent hashing with virtual nodes, weights, replicas, and versioned migration while identifying the hot-key and failure problems it cannot solve.

Open the question and answer
BackendHard

Backend Interview: Explain OAuth Authorization Code Flow with PKCE

Derive the OAuth authorization code flow across authorization, callback, and token exchange; separate state, PKCE, client authentication, and OIDC; then verify the design with attacks and failure tests.

Open the question and answer
DataHard

SQL Interview: Calculate Exact Day-7 Cohort Retention

Build an exact Day-7 cohort-retention query in PostgreSQL, with calendar-day time zones, mature-cohort filtering, user-level deduplication, zero-return preservation, and production checks.

Open the question and answer
CodingHard

Coding interview: How would you design an error-recovering expression parser?

Build lexing, parsing, synchronization, diagnostics, and partial ASTs so one syntax error does not invalidate an entire document.

Open the question and answer
System designHard

System Design Interview: Design an E-commerce Payment Processing System

Derive a recoverable e-commerce payment system from payment intents, authorization and capture, idempotent retries, asynchronous webhooks, an immutable money ledger, refunds, and reconciliation.

Open the question and answer
BackendHard

Backend Interview: How Do You Prevent SQL Injection?

Separate SQL code from data with server-side parameterization, map dynamic identifiers through fixed allowlists, preserve tenant authorization, and verify raw-query paths, stored procedures, and second-order execution.

Open the question and answer
DataHard

SQL Interview: Find Each User's Longest Consecutive Login Streak

Solve a PostgreSQL gaps-and-islands interview problem by fixing the business-day grain, deriving a stable group key with ROW_NUMBER, preserving tied longest streaks, and testing time-zone and duplicate-event edge cases.

Open the question and answer
CodingHard

Coding Interview: How do you implement a cancellable priority task scheduler?

Implement a single-node scheduler with deadlines, priorities, duplicate-task replacement, and cancellation while handling stale heap entries, worker limits, and shutdown races.

Open the question and answer
System designMedium

System Design Interview: Design a URL Shortener

Design a durable, low-latency URL shortener by deriving code-space, storage, cache, redirect, idempotency, expiration, and abuse controls from explicit traffic assumptions.

Open the question and answer
BackendHard

Backend Interview: How Do You Size a Database Connection Pool and Diagnose Exhaustion?

Derive connection-pool limits from a database-wide budget, request concurrency, and replica count, then distinguish an undersized pool, a leak, and database overload with application queues and PostgreSQL session evidence.

Open the question and answer
DataHard

Data Engineering Interview: How Do You Debug Wrong Dashboard Numbers?

Start with metric semantics and a trustworthy comparator, trace lineage to the first bad boundary, then restore trust with containment, idempotent backfills, reconciliation, and data contracts.

Open the question and answer
CodingMedium

Coding interview: Implement a concurrency-limited async map with cancellation

Use fixed workers, indexed results, explicit error modes, and AbortSignal to solve an async scheduler problem.

Open the question and answer
System designHard

System Design Interview: Design a Distributed Message Queue

Derive a replayable, scalable, multi-tenant message queue from delivery contracts, partitioned logs, replica acknowledgments, consumer offsets, and an object-storage path for large payloads.

Open the question and answer
BackendHard

How Do You Perform a Zero-Downtime PostgreSQL Schema Migration?

Start with rolling-deployment compatibility, then design an abortable expand-backfill-cutover-contract workflow that handles PostgreSQL DDL locks, dual writes, constraint validation, indexes, and phase-specific rollback.

Open the question and answer
DataHard

Data Engineering Interview: How Do You Design an ML Feature Pipeline Without Training-Serving Skew?

Using real-time fraud scoring, design a verifiable ML feature pipeline with a semantic contract, two clocks, offline and online stores, versioned rollout, and feature-vector replay.

Open the question and answer
CodingHard

Coding Interview: Implement a Time-Versioned Key-Value Store

Implement set/get with per-key version histories and upper-bound binary search, covering out-of-order timestamps, ties, boundaries, and memory trade-offs.

Open the question and answer
System designHard

System Design Interview: How Would You Design a Metrics Monitoring and Alerting System?

Start with time-series and cardinality budgets, then design a metrics platform with high-throughput collection, bounded queries, reliable alerts, tenant isolation, and testable recovery.

Open the question and answer