Structured Problem Solving and Decomposition Questions
Methodical problem solving for open-ended and ambiguous situations once the problem is defined: decomposing a goal or problem into mutually exclusive, collectively exhaustive parts (issue trees, metric trees and driver breakdowns, work breakdown into subproblems and vertical slices), forming and prioritizing hypotheses (hypothesis trees and funnels, including laying out candidate explanations for a metric drop or model degradation and the cheapest test for each branch), choosing an analytical approach, and reasoning to a recommendation. Also covers turning a vague mandate into measurable, testable subproblems with owners, breaking a large initiative into workstreams, mapping dependencies, sequencing the work, deciding the first deliverable and what to defer, structuring plans that mix research, analytics and experiments, and talking through real examples of cutting a messy problem into parts. Covers explaining and adapting structured problem-solving methods across contexts, choosing and switching methods, and coaching others to structure ambiguity. Excludes turning a vague request into a scoped problem statement, named-framework business cases, root-cause techniques for failures and metric movements (running the diagnosis itself), prioritization scoring and trade-off decisions, deciding how to act under incomplete information, market sizing and estimation, and framing machine-learning problems, which are covered elsewhere.
When a team plans a large feature, what is the difference between slicing it vertically and slicing it horizontally, and why does it matter? Use a search feature as the example and tell me which you would default to and when you would not.
Sample Answer
Direct answer
A sprint is a fixed work period, often two weeks. A horizontal slice is a piece of work along one technical layer (the database, then the service, then the screen). A vertical slice is a thin piece that cuts through every layer and delivers something a user can actually use. It matters because only vertical slices produce feedback and real risk information early. I default to vertical slicing and avoid it in a few specific cases: a shared foundation that must exist first, specialist teams that need an agreed interface to work in parallel, and work with no user-visible increment.
Search feature, two ways
Terms: the search index is the lookup structure that makes searching fast, the API is the service the screen calls to run a search, typo tolerance matches "shose" to "shoes", and an increment is a piece of working product a user can use.
| Horizontal plan | Vertical plan |
|---|---|
| Sprint 1: build the search index | Slice 1: keyword search on product titles only, simple results list, no filters, working end to end |
| Sprint 2: build the search API | Slice 2: filters (price, category) |
| Sprint 3: build the results screen | Slice 3: typo tolerance and synonyms |
| Nothing is usable until sprint 3 | Slice 4: ranking by popularity |
| Slice 5: autocomplete |
Why it matters
- Early feedback: after slice 1 real people can type queries, and the team learns what they search for before building filters nobody uses.
- Risk shows early: speed with real catalog size, or the index missing half the products, appears in week one, not after three layers are "done".
- Optionality (keeping your choices open): if priorities change after slice 2, the team stopped with a working feature, not three unfinished layers.
- Honest progress: "layers done" says little about whether a user can do anything.
The test for a good slice
Can a real user do something useful with this slice alone? Can it be demoed? Does it touch every layer, even thinly?
When I would not default to vertical
- A risky shared foundation several features will depend on, such as migrating the search engine or a data model hard to change later. I would still make the first step a thin "walking skeleton" (one query end to end) to prove the layers connect.
- Specialist teams working in parallel, where agreeing the interface first (a time-boxed horizontal step) lets them proceed independently. The interface is the agreed contract between the teams, for example: the screen sends the query text and a page number, and the service returns a list of product id, title and price. That is a two-day agreement session, not a two-sprint build.
- Work with no user-visible increment, such as security hardening or compliance changes. A horizontal first step here looks like a one-sprint (two-week) task such as "enforce encrypted connections on the search service", finished and verified on its own, with a visible done-test (for example a scan that reports no unencrypted endpoints).
Second example: a reporting dashboard
Two independently valuable vertical slices: (1) a "weekly sales by region" chart for regional managers, covering the data pull, calculation, chart, access control and export, using data that already exists; (2) a "late deliveries" table for operations, with its own query, definition of "late", alert threshold and permissions. Either can ship alone and be judged by its users, which a plan of "build all queries, then all charts" cannot offer.
Pitfalls
- A "vertical" slice that is really one layer, such as a screen with fake data and no backend.
- Slices so thin they carry no user value (a search box that returns nothing).
- Skipping the foundation for ever, then paying for it in rework.
You have six weeks to deliver a prototype of multimodal search. Break the work into workstreams that do not overlap or leave gaps, name the critical dependencies, and define the minimum viable version.
Sample Answer
Direct answer
Multimodal search means search across more than one type of content or query, here assumed to be text and image queries returning images from a product catalog. Four terms recur: retrieval is finding the items that match a query; an embedding model converts text or an image into a list of numbers so that similar items sit close together; an index is the lookup structure that finds the nearest items quickly; ranking is ordering the matches so the best come first. I would split the work by what each workstream produces, so each deliverable has one owner and the list covers the whole prototype. Critical path: data, then retrieval, then API, then demo, with evaluation running alongside and gating the model choice. The minimum viable version (the smallest version that still proves the core idea) is text-to-image search on a fixed catalog that meets an agreed quality bar, with image-upload search as the stretch.
Structured elaboration
Workstreams (mutually exclusive by output, collectively exhaustive for a demo):
| # | Workstream | Produces | Also owns (so cross-cutting items are not orphaned) |
|---|---|---|---|
| 1 | Data and corpus | cleaned catalog, image ingestion, metadata | image licensing and privacy check |
| 2 | Retrieval core | embedding model choice, index, ranking | latency budget (the longest one search may take before users notice the wait) |
| 3 | Query experience | API and UI for text box, image upload, results | usability smoke test |
| 4 | Evaluation | judged query set (test searches with human-marked correct results), quality metric (one score for how often search finds them), test plan | regression checks each week |
| 5 | Platform | hosting, deployment, cost tracking | access and demo environment |
Critical dependencies:
- The evaluation set (workstream 4) must exist by end of week 2, or the embedding comparison has no yardstick.
- The corpus (1) must be ingested before the index (2) can be built.
- The API contract (the agreed request and response format between the UI and the search backend; owned by workstream 3, signed off by workstream 2) must be fixed by week 3 so UI work does not wait.
- Platform (5) must provide a stable environment before week 5 integration.
Milestones with acceptance criteria and test owners:
| Week | Milestone | Acceptance criterion | Tested by |
|---|---|---|---|
| 1 | Corpus plan, evaluation set drafted, API contract draft | catalog loaded; 100 judged queries (illustrative size) | Evaluation owner |
| 2 | Text baseline plus embedding comparison | one model chosen on the judged set | Evaluation owner |
| 3 | Index and API; midpoint go/no-go (a checkpoint where the team decides to continue or stop) | queries return results end to end | Retrieval owner |
| 4 | UI with text and image upload | demo path works unaided | Query experience owner |
| 5 | Integration, quality and latency checks | meets quality bar agreed with the product lead | Evaluation and Platform owners |
| 6 | Demo, hardening, handoff notes | demo script runs three times cleanly | Whole team |
Minimum viable version: text query to top 10 image results over the fixed catalog, hitting the agreed quality bar (for example, one judged query is "red leather ankle boots" with 12 catalog items marked relevant; the bar could be at least one relevant item in the top 10 results for 80 of the 100 judged queries, with the number illustrative and set with the product lead). Image-upload search is added only if the week 3 go/no-go shows the index and API on schedule (the week 4 check confirms it).
Communication plan for the senior lead: a one-page update each week (done, next, risks, decisions needed from you), a go/no-go review at the end of week 3, and the demo in week 6.
Image-upload decision point. The week 4 milestone builds the text path first and the image-upload path only if the week 3 go/no-go shows the index and API on schedule. If week 3 slips, upload is dropped from the week 4 milestone and from the minimum viable version, and the week 4 acceptance criterion becomes "text query demo path works unaided". So the single decision point for the stretch is the end of week 3, and the week 4 check confirms it rather than deciding it. Likewise, the week 1 row means the catalog extract is loaded and the full ingestion and cleaning plan is written, with the full ingestion finished before the index build in week 3.
Trade-offs and pitfalls
- Splitting by technology layer alone leaves cross-cutting issues (latency, licensing, testing) with no owner. The right-hand column of the table prevents that.
- Building the UI before the evaluation set produces a demo that looks good and cannot be judged.
- Scope pressure: if week 3 slips, drop image upload before cutting evaluation.
Product wants a 'save for later' feature on web and mobile in two weeks. How would you break it down, what would you cut to make a first slice that is real and usable, and what would you tell product about what is deferred?
Sample Answer
Direct answer
Define "real and usable" as the smallest loop a user can complete: save an item on one device, come back later, find it, open it. Build exactly that loop on web and mobile against one shared server-side store, cut everything that organizes, shares or notifies, and give product a written list of what is deferred, why, and what would bring each item back.
Structured elaboration
Breakdown. Components: save and unsave control on items; saved-items storage and API (add, remove, list); saved list screen; sign-in requirement; analytics events; edge cases (item deleted after saving, duplicate saves, long lists).
Cut rule. Keep what the loop needs. Cut what adds organization (folders, tags), distribution (sharing), prompting (reminders, notifications) or fidelity (offline save, real-time cross-device push).
Kept for the first slice
- Save/unsave toggle on item detail and list rows.
- A saved list, newest first, with pagination (the list loads a page at a time, for example 20 items, instead of all at once).
- Logged-in users only: an anonymous tap leads to sign-in, then completes the save.
- Server-side storage, so the same account sees the same list on web and mobile (pull on open, not push: the app fetches the list when the screen opens instead of the server sending live updates).
- Save and unsave are idempotent (repeating the request has no extra effect) so double taps are harmless.
Assumed team and plan (state assumptions out loud). One engineer each for backend, web and mobile, 10 working days:
- Days 1-2: agree the API contract (the exact requests and responses) and the data model (how a saved item is stored: user, item, time saved); backend ships a stub (a stand-in that returns fixed sample data so web and mobile can build before the real service exists).
- Days 3-7: backend, web and mobile build in parallel against the contract.
- Days 8-9: integration, edge cases, analytics events.
- Day 10: buffer and a staged rollout (release to a small share of users first) behind a feature flag (a switch that turns the feature on or off without a new release).
Worked example
What you tell product, as a short table:
| Item | Status | Why | What brings it back |
|---|---|---|---|
| Save, unsave, saved list on web and mobile | Ships in 2 weeks | The core loop | n/a |
| Folders or collections | Deferred | Adds UI, a bigger data model (folder records) and migration work (updating stored data to the new structure) | Saved lists growing long, or users asking to group |
| Sharing a saved list | Deferred | New permissions and privacy questions | Evidence of group use cases |
| Reminders and notifications | Deferred | Needs notification infrastructure and consent design | Saved items rarely revisited |
| Offline saving on mobile | Deferred | Needs sync and conflict handling (reconciling saves made offline with the server when the two versions differ) | Many saves made on poor connections |
| Real-time cross-device updates | Deferred | List refresh on open covers most needs | Visible stale-list complaints |
Success measures to agree before launch: saves per active user, and the share of savers who return to the list within 7 days. Any estimate of how long a deferred item takes is a rough estimate to confirm after the first slice, not a promise.
A worked reading of the measures (illustrative): in launch week 2,000 users are active and 500 of them save at least once, making 3,000 saves in total, so saves per active user is 3,000 / 2,000 = 1.5. If 150 of those 500 savers open the list again within 7 days, the return rate is 150 / 500 = 30%.
Trade-offs and pitfalls
- Cutting "web or mobile" instead of cutting depth breaks the brief; cut features, keep both platforms.
- Silent scope cuts destroy trust. A deferred list with reasons makes the cut a decision product owns.
- Skipping edge cases to save time ships bugs on day one: deleted items and duplicate saves must be handled even in the thin slice.
- If the two weeks are fixed and the team is smaller than assumed, cut the web or mobile list screen polish before cutting the backend contract.
- What would flip the plan: if anonymous saving is the main use case, you would need local storage and merge-on-login, which is a bigger first slice.
You have five workstreams: auth, payments, client validation, analytics and fraud detection, with dependencies among them. How would you decide what order to build them in, where the fastest learning is, and what could run in parallel?
Sample Answer
Direct answer
Separate two orders that are often confused: the order things must be built in (set by dependencies) and the order you learn in (set by uncertainty). Build order follows the critical path; learning order starts the riskiest unknowns early with cheap spikes (short, time-boxed experiments that answer one question and are thrown away, not production code), even if the full build comes later. Anything with no dependency between them runs in parallel.
Structured elaboration
Assumed dependencies (state them, then confirm with the team)
- Auth (who the user is) feeds payments, because a payment belongs to an identity.
- Payments produces the transactions that fraud detection scores.
- Analytics events are inputs to fraud features, and analytics can start with instrumentation early.
- Client validation (checking input in the app before sending it) depends on nothing but helps payments forms.
Critical path is the longest chain of dependent work: auth, then payments, then fraud detection. Everything off that chain has slack (time it can slip without delaying the end).
Worked example
Illustrative durations in weeks: auth 2, payments 3, fraud detection 4, analytics 2, client validation 1.
- Critical path: 2 + 3 + 4 = 9 weeks.
- Schedule on the critical path: auth weeks 1-2, payments weeks 3-5, fraud detection weeks 6-9.
- Analytics must be finished by the end of week 5, when fraud starts. It takes 2 weeks, so its latest start is week 4; starting in week 1 instead gives 4 - 1 = 3 weeks of slack.
- Client validation must be finished by the end of week 5, when payments goes live. It takes 1 week, so its latest start is week 5; starting in week 1 gives 5 - 1 = 4 weeks of slack.
- So weeks 1-2 run auth, analytics and (if capacity allows) validation in parallel.
Fastest learning. Fraud detection is last to build but the most uncertain: is there signal, how are labels obtained? Run a shallow offline analysis on historical data and a payments-provider sandbox spike in week 1, while building in dependency order.
The same method on two other problems
- Five ML workstreams, four weeks, one engineer. One engineer means no parallelism, so cut each to a thin slice and sequence by what unblocks and teaches most. For example (data pipeline, labeling, training, serving, monitoring): week 1 data plus a minimal labeled set and a baseline, week 2 a first model with offline evaluation, week 3 serving, week 4 hardening with monitoring reduced to logging inputs and predictions, full alerting deferred.
- Model quality versus a 100 ms latency budget. Latency is the time from request to response; budget it per stage, illustratively 20 for network and orchestration (the code that coordinates calls between services), 30 for feature fetch (looking up the input values the model needs), 35 for inference (the model computing its prediction), 15 for post-processing (total 100). Levers: architecture (a smaller model, or a distilled one trained to imitate a larger one), features (precompute expensive ones), caching (reuse answers for repeated inputs, at the cost of staleness), batching (grouping several requests into one model call: higher throughput, meaning more requests handled per second, but waiting to fill a batch eats budget). Measure the quality lost per millisecond saved (illustratively, a distilled model that cuts inference from 35 to 20 ms, 15 ms saved, while accuracy falls from 91% to 90%, costs about 0.07 points per ms; caching that saves 10 ms at no accuracy cost should be taken first) and judge at the 99th percentile, the slowest 1% of requests, not the average.
Trade-offs and pitfalls
- Dependency order can hide the riskiest item at the end; spikes fix that without changing build order.
- Parallel work needs people; with fewer people than branches, the critical path still goes first.
- A mocked upstream lets parallel work start, but integration surprises move to the end unless you schedule an early integration.
- What would flip the order: if fraud signal turns out to be weak in the spike, you reconsider the whole workstream before payments is built.
You are asked to add search to an existing mobile app. How would you break the initiative into subcomponents, map the dependencies between them, and decide which slice ships first?
Sample Answer
Direct answer
Break search into the layers a query passes through, agree the contract between the layers first so teams can work in parallel, then ship the thinnest slice that goes all the way from the search box to a tappable result. A thin vertical slice (one narrow path through every layer) beats finishing one layer completely, because only a shipped slice produces the real queries that tell you what to build next.
Structured elaboration
Subcomponents of "add search to a mobile app"
| Component | Job |
|---|---|
| Content source and index | Decide what is searchable and keep a searchable copy (an index) of it fresh |
| Search service and API | Takes a query string, returns ranked results |
| Query handling and ranking | Typo tolerance, synonyms, ordering of results |
| Mobile UI | Search box, results list, empty state, recent searches |
| Instrumentation | Log queries, taps, and searches with no results |
| Quality evaluation | A set of example queries with expected results |
| Operations | Response time, cost, access control on results |
Dependencies. The UI needs the API contract (request and response shape), not the finished API, so UI and backend can start together against a stub (a stand-in that returns fixed sample results so the screen can be built before the real service exists). The API needs the index; the index needs access to the content. Ranking improvements need query logs, which need instrumentation, which needs the UI to be live. That last chain is why the first slice should ship early.
Which slice first. Choose the slice that touches every layer and teaches the most: search one content type by title with prefix matching (what has been typed so far is matched against the start of titles, so "sho" finds "shoes"), return the first 20 results, tap to open the item, log every query. Defer filters, typo tolerance, autocomplete, voice input and personalization. Each is a bounded add-on once real queries exist.
Worked example
Slice 1 for a shopping app: "type a product name, see up to 20 matching products, tap one." Contract agreed on day one: request is a query string plus a page cursor (a marker saying where the next page of results begins); response is a list of item id, title and thumbnail. Done-criteria: the UI renders results from the stub; the real API answers within the latency target the team set; every query is logged. As one checkable sentence: typing "shoe" returns up to 20 matching products from the real API within the agreed response time, tapping one opens its detail page, and a log row with the query text and result count exists.
The same method on other initiatives, in short
- Save for later: the interfaces are client to saved-items API (save, unsave, list) and API to analytics (event schema). Agreeing those two contracts lets mobile, web and backend build in parallel.
- Four-market wallet launch: decompose by workstream (compliance, partnerships, UX, backend, fraud) and launch one market first as the thin slice. Compliance and partner approvals are external and slow, so start them first even though the engineering path looks shorter.
- Audit logging: components are what to record, capture hook, tamper-resistant storage, retention, and a viewer. Validate each by performing an action and checking one record with who, what and when appears, then trying to alter it and confirming that fails.
- ML feature pipeline (ingestion, features, training, inference, monitoring), each with one done-criterion and one risk to mitigate. Terms: a feature is an input signal given to the model; offline means on stored historical data and online means on live traffic; training teaches the model from past examples and inference is the model predicting on new cases; a label is the known right answer used to teach and score the model; a schema is the agreed list of columns and types in the data; proxy metrics are quick stand-in measures used while real labels have not arrived yet.
| Component | Done when | Risk and mitigation |
|---|---|---|
| Ingestion | A day of data lands with expected row counts | Silent schema change: validate schema on arrival |
| Features | Same feature values offline and online on a sample | Training and serving drift apart (the model sees differently computed values live than it learned from): one shared definition |
| Training | A reproducible run beats a simple baseline | Leakage of future data (the model learns from information that would not exist yet at prediction time): split by time |
| Inference | Predictions return inside the latency budget | Dependency down: fall back to a safe default |
| Monitoring | Dashboard and alert on input and output shifts | Labels arrive late: watch proxy metrics |
Trade-offs and pitfalls
- Splitting by team ("backend search, mobile search") hides dependencies; split by what each piece delivers.
- Finishing the index and ranking before any UI exists means no user learning for weeks.
- A slice must be usable, not a demo: includes an empty state and error handling.
- Do not turn each component into a long acceptance-criteria document; one checkable done-criterion is enough at this stage.
Unlock Full Question Bank
Get access to all 17 Structured Problem Solving and Decomposition interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.