Problem Decomposition Questions
Break complex problems into smaller, manageable subproblems and solution components. Demonstrate how to identify the root problem, extract core patterns, choose appropriate approaches for each subproblem, sequence work, and integrate partial solutions into a coherent whole. For technical roles this includes recognizing algorithmic patterns, scaling considerations, edge cases, and trade offs. For non technical transformation work it includes logical framing, hypothesis driven decomposition, and measurable success criteria for each subcomponent.
MediumTechnical
73 practiced
Write a JavaScript function mergeIntervals(intervals) that accepts a list of closed intervals and returns a new list of merged intervals. Decompose the approach into sorting by start time and a linear scan to merge overlaps. Example: input [[1,3],[2,6],[8,10],[15,18]] -> output [[1,6],[8,10],[15,18]]. Handle empty input and invalid intervals gracefully.
MediumTechnical
125 practiced
Design an observability plan for a new microservice. Decompose into metrics (latency histograms, p95/p99, error rates, throughput), logs (structured, correlation IDs), distributed tracing spans, SLOs and alerting rules, dashboards, and sampling/tracing strategy. Define measurable SLO targets and describe how you would validate them in production.
EasyTechnical
77 practiced
You have a brute-force O(n^2) solution to the two-sum problem. Describe, step-by-step, how you would decompose the problem to identify the hashmap pattern and implement an O(n) solution. Discuss edge cases such as duplicate values, using the same element twice, streaming input, and memory trade-offs for storing seen values.
MediumTechnical
101 practiced
Explain how to decompose and implement an LRU cache in Java with get and put operations that run in O(1). Describe your choices of data structures (HashMap + doubly-linked list), how eviction works, and how you would approach thread-safety. Provide a single-threaded Java implementation sketch for the LRU cache class with capacity and eviction behavior.
HardSystem Design
75 practiced
Plan a zero-downtime migration of a critical database table with 100M rows to a new schema. Decompose the migration into steps: add new columns, backfill data in small batches, implement dual-write during transition, switch read path to new schema, verify consistency, and cleanup old columns. Describe monitoring, data validation checks, rollback strategy, and how to keep application latency stable during backfill.
Unlock Full Question Bank
Get access to hundreds of Problem Decomposition interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.