Practise the reasoning, not just the question.
57 original software/backend practice prompts. These are authored exercises—not reported employer questions, predictions or an official syllabus.
DSA
- When does a frequency map beat repeatedly scanning the input?
- Find a pair with a target sum; compare sorting and hashing.
- When does a sliding window fail because negative values are present?
- Count subarrays with a target sum; explain the initial empty prefix.
- Merge overlapping intervals and handle touching endpoints.
- Process many range increments using a difference array.
- Find an extremum with binary search; state the monotonic condition.
- Track the k largest values in a stream using bounded memory.
- Find the next greater value using a monotonic stack.
- Traverse a graph while avoiding cycles and disconnected omissions.
- Find a shortest unweighted route and reconstruct its path.
- Explain why multi-source BFS starts with several queued vertices.
- Order dependencies and detect impossible cyclic requirements.
- Check whether a graph can be colored using two colors.
- Choose BFS, Dijkstra or Bellman–Ford from the edge constraints.
- Trace recursion frames and distinguish local from shared state.
- Choose a DP state; derive the transition and base cases.
- Contrast counting coin combinations with minimizing the number of coins.
- Validate nested brackets and test malformed input.
- Maintain cache lookup and eviction without linear scans.
Practical coding / LLD
- Build a reservation service with explicit states and conflict checks.
- Make pricing rules replaceable without changing the order workflow.
- Implement fair iteration over sequences of unequal lengths.
- Extend a key/value API to support versions, expiry and deletion.
- Design cache eviction as a testable policy.
- Build an asynchronous logger with a bounded buffer.
- Explain who owns a state transition and how invalid transitions are rejected.
System design
- Start from requirements, scale assumptions, APIs and a data model.
- Design request quotas and explain local versus global limits.
- Prevent duplicate side effects when a client retries after a timeout.
- Deliver notifications despite transient failures without unbounded retries.
- Design file upload, metadata, storage and resumable transfers.
- Discuss read-after-write requirements and replica lag.
- Choose partitions; explain hot keys and skewed traffic.
- Design ingestion with backpressure and replay.
- Serve global media while protecting the origin during cache misses.
Backend fundamentals
- Compare transaction isolation levels using a concrete race.
- Choose optimistic or pessimistic locking for contested inventory.
- Explain how an index helps one query but costs extra writes.
- Compare joins and test missing or duplicate matching rows.
- Use stable cursor pagination; handle concurrent insertion.
- Coordinate a database update and event publication safely.
- Define timeouts, retry budgets and circuit-breaker behavior.
- Explain equals/hashCode and safe HashMap key choices in Java.
- Compare interface capabilities with shared abstract-class state.
Systems / debugging
- Explain process, thread and memory boundaries.
- Compare a mutex, semaphore and condition variable.
- Find a deadlock and reason about lock ordering.
- Reproduce a production failure with logs, traces and a minimal test.
- Review unfamiliar code and fix a bug without unrelated refactoring.
- Verify an AI-generated change with tests and independent reasoning.
Behavioral
- Describe a technical decision, alternatives and measured outcome.
- Explain a disagreement and how you reached a decision.
- Describe an incident, your role, recovery and prevention.
- Discuss mentoring and raising code-review quality.
- Explain what you learned from a failed approach.
- State your own contribution without claiming the whole team's work.