cswork / libraryOpen practice workspace

Interview guides · dunnhumby

dunnhumby Software Engineer Interview Guide

dunnhumby Software Engineer interview guide: reported rounds, questions and how candidates describe the process.

The 60-second brief

As a Software Engineer at dunnhumby, you are at the heart of the world’s leading customer data science company. Your work directly enables the processing, analysis, and activation of massive retail datasets that drive personalization and loyalty programs for global retailers. You will be building scalable, resilient systems that translate complex data science models into tangible business value. This role requires a strong balance of core engineering fundamentals and an appreciation for data-centric architectures. You will contribute to products that influence the shopping experiences of millions of consumers daily. Whether you are developing robust APIs, optimizing data pipelines, or building out web applications, your code must perform reliably at an enterprise scale.

This guide is scoped to a Software Engineer candidate at dunnhumby.

Focus areas

  • Software Engineering
  • Coding Interviews
  • Problem Solving Under Time Constraints

The dunnhumby interview process

dunnhumby candidates report 4 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.

Recruiter Phone Screen

Initial call to discuss your background, expectations, and logistics.

What to demonstrate

  • Initial call to discuss your background, expectations, and logistics
  • Depth in Software Engineering

How to prepare

  • Be able to walk your CV end to end in two minutes, and say why this company specifically.
  • Have your salary expectations, notice period and location constraints ready, and ask for the rest of the loop in writing.

Online Assessment

Coding assessment hosted on platforms like HackerEarth to test basic coding and computer science knowledge.

What to demonstrate

  • Coding assessment hosted on platforms like HackerEarth to test basic coding and computer science knowledge
  • Depth in Software Engineering

How to prepare

  • Answer aloud and timed: How does indexing work in a relational database, and when would you avoid using it?
  • Answer aloud and timed: Describe the various transaction isolation levels in a DBMS.

Technical Rounds

Rigorous technical interviews that may include live coding, conceptual questions, or a take-home assignment.

What to demonstrate

  • Rigorous technical interviews that may include live coding, conceptual questions, or a take-home assignment
  • Depth in Software Engineering

How to prepare

  • Answer aloud and timed: How do you resolve merge conflicts in Git, and what is your preferred branching strategy?
  • Answer aloud and timed: Write a program to implement a basic sorting algorithm and explain its time complexity.

Managerial Interview

Comprehensive interview with a hiring manager focusing on technical and competency aspects.

What to demonstrate

  • Comprehensive interview with a hiring manager focusing on technical and competency aspects
  • Depth in Software Engineering

How to prepare

  • Answer aloud and timed: Given a string, write a function to find the first non-repeating character.
  • Answer aloud and timed: How would you structure a take-home assignment to demonstrate Test-Driven Development (TDD)?

Where candidates lose points

Embrace Test-Driven Development

If you are given a coding task with a generous time limit, do not just write the solution. Write the tests first or alongside your code. Interviewers at dunnhumby actively look for candidates who prioritize TDD and robust error handling.

Prepare for the Rapid-Fire Round

Some candidates report facing technical rounds with dozens of quick-fire questions covering OOP, OS, and DBMS. Brush up on your core CS trivia so you can answer these confidently and concisely without stalling.

Do not underestimate the importance of time management during coding assessments

If you spend too much time over-engineering a solution or struggling with minor bugs (like float rounding issues), you may run out of time to demonstrate your full capability.

Know Your Resume Inside Out

You will be asked to draw high-level diagrams and discuss the architecture of your past projects. Be ready to defend the technical choices you made, the trade-offs you considered, and the business impact of your work.

Questions & practice

Can you explain the difference between a process and a thread in an Operating System?

Medium · Core CS Fundamentals

Approach

  1. Say what the runtime actually does before reasoning about the code.
  2. Name what is shared across threads and what owns each piece of state.
  3. Identify the window where an invariant is briefly untrue.
  4. Distinguish a value from a reference to it, and say which one you handed out.

Follow-up

  • What happens if two callers reach this at the same time?
  • Where could this allocate more than you expect?

Write a program to implement a basic sorting algorithm and explain its time complexity.

Medium · Coding and Algorithms

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Given a string, write a function to find the first non-repeating character.

Medium · Coding and Algorithms

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

How would you structure a take-home assignment to demonstrate Test-Driven Development (TDD)?

Medium · Coding and Algorithms

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Write an executable code snippet to solve [specific array/string manipulation problem] within 30 minutes.

Medium · Coding and Algorithms

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Keep soft-deleted accounts from blocking re-registration

Easy · soft delete · unique constraints · engine differences

app_user holds user_id, tenant_id, email CITEXT, password_hash (NULL for SSO principals), email_verified_at, auth_version, status ('invited','active','suspended','deactivated'), created_at, updated_at, deleted_at. Two live accounts for one address inside a tenant must be impossible, but an address freed by a soft delete must be reusable, and the same tenant may delete and re-register it repeatedly. Write the uniqueness DDL for PostgreSQL 16, then the equivalent for MySQL 8 where partial indexes do not exist, and say what each permits once three deleted rows already hold that address.

Approach

  1. Start from what is actually unique: not (tenant_id, email), but (tenant_id, email) among live rows. PostgreSQL says that directly — CREATE UNIQUE INDEX app_user_live_email ON app_user (tenant_id, email) WHERE deleted_at IS NULL. A full constraint over the same two columns burns the address permanently the first time someone deletes an account.
  2. Keep case-insensitivity in the type or the index, never in the application: CITEXT as given, or UNIQUE (tenant_id, lower(email)) as an expression index where the extension is unavailable. A case-sensitive unique column is exactly how two accounts for one human appear.
  3. For MySQL 8 the predicate has to move inside the key: add a discriminator column that is a constant 0 while the row is live and is set to user_id on delete, with UNIQUE (tenant_id, email, deleted_marker). Live rows share the constant and still collide; deleted rows differ from each other and stop colliding.
  4. State the NULL variant and its dependency: leaving the marker NULL for deleted rows also works, because a unique index treats NULLs as distinct — true in MySQL, and true in PostgreSQL only under the default NULLS DISTINCT, which PostgreSQL 15 lets you reverse. Check the polarity against the three existing deleted rows: constant-on-live is what preserves the collision you want, and reversing it silently admits duplicate live accounts.

Follow-up

  • A deleted account re-registers with the same address the next day. Do the old resource rows follow the new user_id, and how does the API keep the two principals apart?
  • How do you honour an erasure request while resource_revision.actor_user_id still references this table?

Stop tag and share joins from fanning out a page

Medium · join fan-out · semi-joins · many-to-many

resource_tag is (resource_id, tag_id) with PK (resource_id, tag_id); resource_share is (resource_id, shared_with_user_id, permission). The tagged-and-shared listing inner-joins resource to both, filters tenant_id, tag_id = ANY($2) and shared_with_user_id = $3, orders by updated_at DESC and takes 50. Pages come back with fewer than 50 distinct resources and the total in the header is far too high. Explain the row multiplication, rewrite both the page query and the count query so each is correct, and name the index each one needs. PostgreSQL 16.

Approach

  1. Do the arithmetic against the predicates that are actually there. An inner join emits one row per matching child row, and both joins are filtered: tag_id = ANY($2) admits only the requested tags, shared_with_user_id = $3 admits one user's share rows. So a resource holding three of the requested tags and shared with $3 once yields three rows, not one — the multiplier is its count of matching tags times its share rows for that single user, and that second factor is 1 unless the table admits duplicate (resource_id, shared_with_user_id) pairs. LIMIT 50 then limits rows rather than resources, and COUNT(*) counts pairs — the header is the product, not the population.
  2. Reject DISTINCT as the fix. It deduplicates after the product has been built, so the planner must materialise and sort the fanned-out set before the LIMIT can apply, and it leaves any SUM or AVG in the same select list wrong.
  3. Rewrite both filters as semi-joins, keeping resource as the only row source: AND EXISTS (SELECT 1 FROM resource_tag rt WHERE rt.resource_id = r.resource_id AND rt.tag_id = ANY($2)) and the same shape against resource_share. A semi-join stops at the first match per resource and preserves the driving index order, so ORDER BY updated_at DESC, resource_id DESC LIMIT 50 still stops after 50 rows.
  4. Count with the same predicates and no join at all: SELECT count(*) FROM resource r WHERE r.tenant_id = $1 AND r.status = 'active' AND EXISTS (...) AND EXISTS (...). Nothing multiplies a resource, so the number is the population.

Follow-up

  • The filter changes from 'any of these tags' to 'all of these tags'. Rewrite it and state what it costs relative to the ANY form.
  • A resource can be shared with the same user twice under different permissions. Does your count change, and should it?

What are the four main principles of Object-Oriented Programming?

Medium · Core CS Fundamentals

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

How does indexing work in a relational database, and when would you avoid using it?

Medium · Core CS Fundamentals

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

Describe the various transaction isolation levels in a DBMS.

Medium · Core CS Fundamentals

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

Draw a high-level architectural diagram of the most recent application you built.

Medium · Architecture and Data Modeling

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

How would you design a database schema for a retail customer loyalty program?

Medium · Architecture and Data Modeling

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Walk me through how you would build a RESTful API from scratch.

Medium · Architecture and Data Modeling

Approach

  1. Say who the caller is and what they do when the call fails halfway.
  2. Define the identity of a request so a retry cannot double-apply it.
  3. Separate accepted, pending, failed and confirmed; they are different facts.
  4. Design the error taxonomy before the success shape; callers branch on it.

Follow-up

  • What happens if the caller retries after a timeout?
  • How does a client discover it is on an old version of this contract?

What factors do you consider when deciding between a relational and a NoSQL database for a new feature?

Medium · Architecture and Data Modeling

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Explain your approach to processing and transforming a massive dataset efficiently.

Medium · Architecture and Data Modeling

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

p99 jumped on one listing filter while p50 stayed flat

Medium · query planning · composite index · percentiles

After a release that added an owner_user_id filter to the resource listing, p99 rose from 90 ms to 1.9 s while p50 stayed at 40 ms. Traffic and row counts are unchanged. resource carries the index (tenant_id, status, updated_at DESC, resource_id DESC). The new query filters tenant_id and owner_user_id, orders by updated_at DESC, resource_id DESC, and takes 20 rows. On PostgreSQL, explain the shape of the regression, prove it from a query plan, and give the index you would add.

Approach

  1. Start from the shape. A flat p50 with a moved p99 means a subset of requests changed cost, not all of them, so the first job is naming the subset. Bucket the endpoint's latency by the tenant's row count; the natural hypothesis is that large tenants are a small share of requests and all of the tail.
  2. Get the plan for the new query on a large tenant with EXPLAIN (ANALYZE, BUFFERS). Expect an index scan over the tenant's range, a filter discarding most of it, then a Sort feeding the Limit, possibly reporting Sort Method: external merge Disk. Read actual rows on the scan node, not estimated.
  3. Explain why the existing index cannot serve it. A composite B-tree is seekable only as a left prefix, and with no equality predicate on status the scan cannot treat updated_at as an ordering, because rows in the tenant's range are ordered by status first. Everything matching must be read and sorted before LIMIT 20 can apply, so a tenant with 400,000 rows pays 400,000 rows to return 20.
  4. Add (tenant_id, owner_user_id, updated_at DESC, resource_id DESC). Equality on the first two columns leaves the index ordered by updated_at within that pair, so the plan becomes an index scan that stops after 20 rows with no Sort node. PostgreSQL can scan a B-tree backwards, so the DESC markers matter only if the two sort columns ever disagree in direction; keeping them explicit documents the order the keyset cursor depends on.

Follow-up

  • The endpoint paginates with OFFSET. What does page 500 cost with your index, and what does the keyset version cost?
  • How would you have caught this before release, given that a 10,000-row seed database produces the same plan shape at an unnoticeable cost?

Suggested practice checklist

Built from the rounds and topics dunnhumby candidates report.

Day 1 — Map the dunnhumby loop

  • Write out the reported sequence: Recruiter Phone Screen, Online Assessment, Technical Rounds, Managerial Interview.
  • For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.

Deliverable: A one-page map of the 4 reported rounds, with the weakest marked.

Day 2 — Work Software Engineering

  • Spend the session on Software Engineering, which dunnhumby candidates report being tested on.
  • Write one worked example in Software Engineering and time yourself on it.

Deliverable: One timed worked example in Software Engineering.

Day 3 — Work Coding Interviews

  • Spend the session on Coding Interviews, which dunnhumby candidates report being tested on.
  • Write one worked example in Coding Interviews and time yourself on it.

Deliverable: One timed worked example in Coding Interviews.

Day 4 — Work Problem Solving Under Time Constraints

  • Spend the session on Problem Solving Under Time Constraints, which dunnhumby candidates report being tested on.
  • Write one worked example in Problem Solving Under Time Constraints and time yourself on it.

Deliverable: One timed worked example in Problem Solving Under Time Constraints.

Day 5 — Answer out loud: Core CS Fundamentals

  • Answer aloud, timed: What are the four main principles of Object-Oriented Programming?
  • Answer aloud, timed: Can you explain the difference between a process and a thread in an Operating System?

Deliverable: Spoken answers to 2 reported Core CS Fundamentals question(s), under time.

Day 6 — Answer out loud: Coding and Algorithms

  • Answer aloud, timed: Write a program to implement a basic sorting algorithm and explain its time complexity.
  • Answer aloud, timed: Given a string, write a function to find the first non-repeating character.

Deliverable: Spoken answers to 2 reported Coding and Algorithms question(s), under time.

Day 7 — Answer out loud: Architecture and Data Modeling

  • Answer aloud, timed: Draw a high-level architectural diagram of the most recent application you built.
  • Answer aloud, timed: How would you design a database schema for a retail customer loyalty program?

Deliverable: Spoken answers to 2 reported Architecture and Data Modeling question(s), under time.

Behavioural preparation

Behavioural rounds judge the decision you made and what it cost.

How do you resolve merge conflicts in Git, and what is your preferred branching strategy?

Medium · Core CS Fundamentals

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

How do you handle precision issues when working with floating-point numbers in financial or retail data?

Medium · Coding and Algorithms

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Tell me about yourself and your journey as a software engineer.

Medium · Behavioral and Competency

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Describe a time when you had to explain a complex technical concept to a non-technical stakeholder.

Medium · Behavioral and Competency

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

How do you handle situations where a team member disagrees with your technical approach?

Medium · Behavioral and Competency

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Tell me about a time you identified a major flaw in a system and how you went about fixing it.

Medium · Behavioral and Competency

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Describe a scenario where you had to meet a tight deadline without compromising code quality.

Medium · Behavioral and Competency

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?