cswork / libraryOpen practice workspace

Interview guides · Demandbase

Demandbase Software Engineer Interview Guide

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

The 60-second brief

As a Software Engineer at Demandbase, you are at the core of our mission to transform how B2B companies identify, engage, and convert their target accounts. You will be responsible for building, scaling, and maintaining complex systems that process vast amounts of marketing and sales data. Your work directly impacts the platform’s ability to provide actionable insights, requiring a blend of high-performance backend engineering and thoughtful system architecture. This role is critical to our product strategy, as you will work on data-intensive applications that must remain reliable and performant under significant load. You will collaborate with cross-functional teams, including product managers and data scientists, to solve real-world problems in the B2B space.

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

Focus areas

  • Java
  • Algorithms (DSA)
  • Data Structures

The Demandbase interview process

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

Initial Screening

The first step involves a review of your application and qualifications.

What to demonstrate

  • The first step involves a review of your application and qualifications
  • Depth in Java

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.

Technical Screens

You will participate in technical screens to assess your core engineering skills.

What to demonstrate

  • You will participate in technical screens to assess your core engineering skills
  • Depth in Java

How to prepare

  • Answer aloud and timed: Describe the use cases for volatile, transient, and SOLID principles in Java development.
  • Answer aloud and timed: How do you optimize complex SQL queries involving joins and aggregation?

Deep-Dive Coding Sessions

Engage in coding sessions that require you to design scalable systems.

What to demonstrate

  • Engage in coding sessions that require you to design scalable systems
  • Depth in Java

How to prepare

  • Answer aloud and timed: Explain the trade-offs between different distributed caching strategies.
  • Answer aloud and timed: Given a grid, find the minimum number of steps for a knight to reach a target.

Managerial Discussions

Meet with managers to discuss your fit within the team culture and expectations.

What to demonstrate

  • Meet with managers to discuss your fit within the team culture and expectations
  • Depth in Java

How to prepare

  • Answer aloud and timed: Implement a solution for Validating HTML tags using stacks.
  • Answer aloud and timed: Solve medium-level LeetCode problems involving Graphs and Dynamic Programming.

Final Hiring Decision

The final step involves a decision on your application based on the assessments.

What to demonstrate

  • The final step involves a decision on your application based on the assessments
  • Depth in Java

How to prepare

  • Answer aloud and timed: How would you print numbers 1–N using three threads in a specific sequence?
  • Answer aloud and timed: Design an architecture for an Online Gaming Fantasy App.

Where candidates lose points

Master the fundamentals

Do not overlook the basics of Java or SQL. Detailed knowledge of keywords, memory management, and query optimization is frequently tested.

Be prepared to discuss your projects

You will be asked in-depth questions about your past work. Know your system architecture inside and out.

Clarify requirements

Before writing code, always ask questions to ensure you understand the requirements and constraints of the problem.

Stay composed

If you get stuck, communicate your thought process. Interviewers often provide hints if they see you are on the right track.

Questions & practice

How do you implement a Thread-safe LRU Cache?

Medium · Technical & Domain Knowledge

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?

Given a grid, find the minimum number of steps for a knight to reach a target.

Medium · Data Structures & 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?

Implement a solution for Validating HTML tags using stacks.

Medium · Data Structures & 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?

Solve medium-level LeetCode problems involving Graphs and Dynamic Programming.

Medium · Data Structures & 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 print numbers 1–N using three threads in a specific sequence?

Medium · Data Structures & Algorithms

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?

How do you optimize complex SQL queries involving joins and aggregation?

Medium · Technical & Domain Knowledge

Approach

  1. Name the grain you start from and join outward from it.
  2. Check whether any join is one-to-many before aggregating, or the sums inflate.
  3. Say which index the query would use, and what makes it unusable.
  4. Handle the rows that do not match: that is usually the actual question.

Follow-up

  • How does the query change if that join becomes one-to-many?
  • What happens to this when the table is ten times larger?

Explain why the owner filter ignores the listing index

Medium · composite index · query plans · sort elimination

The only index on resource is (tenant_id, status, updated_at DESC, resource_id DESC). A new endpoint returns one user's resources across all statuses, newest created first: WHERE tenant_id = $1 AND owner_user_id = $2 ORDER BY created_at DESC LIMIT 20. On a tenant with 2M rows it takes 900 ms and EXPLAIN shows a sort above a large scan. Explain precisely why the existing index cannot serve it, give the index that can, and state which of these the new index still will not help: owner_user_id alone across tenants; the same query ordered by updated_at. PostgreSQL 16.

Approach

  1. Separate the two jobs an index does. For filtering, a composite btree is seekable only on a left prefix, so with no predicate on status the scan can at best range over tenant_id and test owner_user_id per row; PostgreSQL 16 has no btree skip scan to jump the unconstrained column.
  2. For ordering, the index is sorted by (status, updated_at) within a tenant and not by created_at, so the LIMIT cannot stop early: every matching row is read and then sorted. That is the 'Sort Method: top-N heapsort' line, and it is why the plan reads 2M rows to answer with 20.
  3. Derive the replacement from the access path — equality, equality, then the ordering column: CREATE INDEX CONCURRENTLY ON resource (tenant_id, owner_user_id, created_at DESC). The scan seeks to the (tenant, owner) range and walks 20 entries in order, so the Sort node disappears along with the row-read.
  4. Treat INCLUDE (title, status) as conditional, not free. An index-only scan still visits the heap for any row whose page is not marked all-visible, so on a table taking 1.2k writes/second the win depends on autovacuum keeping the visibility map current, and the wider index costs more on every insert.

Follow-up

  • 90% of rows are status='active'. Would a partial index WHERE status = 'active' change your answer, and for which of the three queries?
  • A dashboard runs this for 40 owners in one page load. What changes about the design?

Explain the difference between String comparison and String pool in Java.

Medium · Technical & Domain Knowledge

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 use cases for volatile, transient, and SOLID principles in Java development.

Medium · Technical & Domain Knowledge

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?

Explain the trade-offs between different distributed caching strategies.

Medium · Technical & Domain Knowledge

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?

Design an architecture for an Online Gaming Fantasy App.

Medium · System Design & Architecture

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 system to handle high-concurrency data ingestion?

Medium · System Design & Architecture

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 how you would scale a service that is currently experiencing latency issues.

Medium · System Design & Architecture

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?

Listing latency scales with page size, not with filters

Easy · n+1 · latency · query batching

The tenant listing endpoint reads resource filtered by tenant_id and status, ordered by updated_at DESC, and returns each row plus the owner's display name from app_user and the actor of that resource's latest resource_revision. p99 is 55 ms at 10 rows per page and 1.4 s at 200. Database telemetry shows 401 statements per request, each under 1 ms, and nothing in the slow-query log. Diagnose the cause and give the fix, stating the statement count per request and the p99 you expect afterwards.

Approach

  1. Read the counters before forming a theory. 401 statements for 200 rows is one driver query plus two per row, and sub-millisecond execution with an empty slow-query log rules out a bad plan. The time is round trips, which is why it is invisible in every per-query metric and scales with rows returned rather than with filter selectivity.
  2. Name the two per-row statements from their normalised text: a single-row app_user lookup by user_id, and a resource_revision lookup by resource_id ordered by version DESC LIMIT 1. Confirm by dropping those two response fields and watching the statement count fall to one. That locates the calls in the serialisation layer, not the repository.
  3. Check that the arithmetic accounts for the whole gap. Measure one round trip to the replica in isolation; 400 trips at roughly 3 ms of network plus 0.2 ms of execution is about 1.3 s on top of a 55 ms baseline, which matches. If the multiplication had fallen short, the N+1 would only be part of the story and you would keep looking.
  4. Batch both lookups. Collect owner_user_ids and resource_ids from the driver query, then issue WHERE tenant_id = $1 AND user_id = ANY($2) for the users, and PostgreSQL's SELECT DISTINCT ON (resource_id) ... WHERE resource_id = ANY($2) ORDER BY resource_id, version DESC for the latest revision, which the UNIQUE (resource_id, version) index serves directly. On an engine without DISTINCT ON, use a lateral join or a row_number window. Three statements per request at any page size.

Follow-up

  • The page size is capped at 200 today. What breaks first if it is raised to 2,000, and is it still this bug?
  • How do you stop the next N+1 from reaching production, given that no individual query is slow and the endpoint's tests pass?

Suggested practice checklist

Built from the rounds and topics Demandbase candidates report.

Day 1 — Map the Demandbase loop

  • Write out the reported sequence: Initial Screening, Technical Screens, Deep-Dive Coding Sessions, Managerial Discussions, Final Hiring Decision.
  • 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 5 reported rounds, with the weakest marked.

Day 2 — Work Java

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

Deliverable: One timed worked example in Java.

Day 3 — Work Algorithms (DSA)

  • Spend the session on Algorithms (DSA), which Demandbase candidates report being tested on.
  • Write one worked example in Algorithms (DSA) and time yourself on it.

Deliverable: One timed worked example in Algorithms (DSA).

Day 4 — Work Data Structures

  • Spend the session on Data Structures, which Demandbase candidates report being tested on.
  • Write one worked example in Data Structures and time yourself on it.

Deliverable: One timed worked example in Data Structures.

Day 5 — Answer out loud: Technical & Domain Knowledge

  • Answer aloud, timed: Explain the difference between String comparison and String pool in Java.
  • Answer aloud, timed: How do you implement a Thread-safe LRU Cache?

Deliverable: Spoken answers to 2 reported Technical & Domain Knowledge question(s), under time.

Day 6 — Answer out loud: Data Structures & Algorithms

  • Answer aloud, timed: Given a grid, find the minimum number of steps for a knight to reach a target.
  • Answer aloud, timed: Implement a solution for Validating HTML tags using stacks.

Deliverable: Spoken answers to 2 reported Data Structures & Algorithms question(s), under time.

Day 7 — Answer out loud: System Design & Architecture

  • Answer aloud, timed: Design an architecture for an Online Gaming Fantasy App.
  • Answer aloud, timed: How would you design a system to handle high-concurrency data ingestion?

Deliverable: Spoken answers to 2 reported System Design & Architecture question(s), under time.

Behavioural preparation

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

Describe a time you faced a difficult technical challenge and how you overcame it.

Medium · Behavioral & Situational

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 disagreements with team members regarding technical implementation?

Medium · Behavioral & Situational

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?

What is your approach to learning new technologies or frameworks on the job?

Medium · Behavioral & Situational

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?