Role preparation

Software Engineer interview questions and answers.

Algorithms, system design, and production debugging.

Questions

Technical questions to practise out loud

  1. 01

    How do you trade time complexity for space complexity?

    Trade memory for speed when precomputation, caching, or indexing removes repeated work and the memory bound is acceptable; trade time for memory when data is large or allocations dominate. Compare asymptotics and real constraints.

    Read the full breakdown
  2. 02

    How would you design a URL shortener?

    A URL shortener needs a collision-safe ID generator, durable mapping storage, a read-optimized redirect path, caching for hot links, abuse controls, expiry rules, analytics off the critical path, and capacity estimates.

    Read the full breakdown
  3. 03

    How do you debug a production latency regression?

    Confirm the regression with percentile metrics, correlate it with deploys and traffic, use traces to isolate the slow dependency or code path, inspect saturation and query plans, mitigate safely, then validate against the same baseline.

    Read the full breakdown
  4. 04

    How do you choose a data structure?

    Choose a data structure from required operations and invariants: lookup, ordering, insertion, deletion, iteration, duplicates, concurrency, and memory. State the expected complexity and why actual access patterns fit it.

    Read the full breakdown
  5. 05

    When is binary search the right approach?

    Binary search fits a monotonic predicate over an ordered search space: once the predicate changes, it never changes back. Maintain explicit low/high invariants and handle boundaries to avoid off-by-one errors.

    Read the full breakdown
  6. 06

    What makes a distributed system difficult?

    Distributed systems are difficult because messages are delayed, duplicated, reordered, or lost and nodes fail independently. Correct design makes timeouts, retries, idempotency, consistency, ownership, and partial failure explicit.

    Read the full breakdown
  7. 07

    How do you clarify system-design requirements?

    Clarify users, core flows, scale, latency, availability, consistency, security, retention, geography, budget, and growth before drawing components. Quantify the few constraints that actually drive the architecture.

    Read the full breakdown
  8. 08

    How do you reason about consistency and availability?

    During a network partition a distributed operation cannot guarantee both immediate consistency and every response succeeding. Choose per invariant: reject or delay unsafe writes, or accept temporary staleness with reconciliation.

    Read the full breakdown
  9. 09

    What do you look for in code review?

    Review correctness and missing cases first, then security, data consistency, failure handling, concurrency, performance, tests, clarity, and compatibility. Explain impact and propose a concrete change instead of debating personal style.

    Read the full breakdown
  10. 10

    How do you prioritise technical debt?

    Prioritize technical debt by expected business and engineering cost: incident risk, delivery drag, security exposure, frequency, and blast radius. Define a measurable outcome and pay debt alongside the work it blocks.

    Read the full breakdown