Walmart interview questions & answers

20 real Walmart interview questions with full model answers — Behavioral, System design, Technical, Coding. Drawn from the same verified bank ChannelPulse drills from (141 Walmart questions in total).

BehavioralMediumWalmartDirector of Machine Learning

1. How do you collaborate with stakeholders and other organizations?

Model answer

Situation — In a cross-functional ML program, product wanted to improve a customer outcome quickly, while engineering prioritized platform stability and legal and operations teams needed stronger controls before launch. Each group had a reasonable view of the risk, but there was no shared definition of success or clear path for resolving trade-offs. My role was to align the organizations and deliver a decision they could all support.

Task — I needed to turn the competing requests into a coherent plan, make ownership explicit, and keep the work moving without bypassing legitimate review or creating a model that operations could not support.

Action

  • I met stakeholders individually first, listening for their underlying goals and constraints rather than treating their first proposed solution as fixed. I summarized the common objective and the unresolved decisions in neutral language.
  • I brought the group together around a one-page brief: user problem, target outcome, launch constraints, assumptions, decision owners, and measures of success. I distinguished decisions the team could make from risks that required legal or executive approval.
  • I translated technical trade-offs into stakeholder consequences. For example, I explained the value of a more cautious threshold in terms of customer impact, review volume, and operational capacity—not just model precision and recall.
  • I proposed a staged release with a limited cohort, human review for uncertain cases, monitoring, and explicit pause criteria. This gave product a way to learn while giving operations and legal meaningful controls.
  • I maintained a decision log and a regular review cadence. When a new concern emerged, I assessed whether it changed a success metric, a guardrail, or the launch scope, then brought the right decision-makers together rather than letting the issue spread informally.

Result — The teams agreed on a staged plan, launched within the agreed risk boundaries, and used the resulting evidence to decide whether to expand. We measured [business outcome], [model-quality measure], and [operational guardrail], and avoided treating launch as the only definition of success. I learned that collaboration is strongest when stakeholders can see how their concerns shape the plan and who has authority to make each decision.

What interviewers listen for

  • Empathy for different incentives, paired with clear accountability.
  • The ability to translate ML trade-offs into product and operational consequences.
  • A specific mechanism for resolving disagreement and measuring the result.
BehavioralMediumWalmartProduct Manager

2. Can you describe a complex project you led?

Model answer

Situation

At a growing marketplace, sellers managed inventory in one system while buyers saw availability from a separate catalog service. Updates could take several minutes to appear, causing avoidable cancellations and support contacts. I led a cross-functional effort spanning product, two engineering teams, data, operations, and seller support; the project mattered both to customer trust and to peak-season readiness.

Task

I was accountable for defining the outcome and coordinating delivery of a more dependable inventory-update experience. We needed to reduce stale listings without attempting a risky, all-at-once replacement of the legacy systems.

Action

  • I translated the complaint into measurable requirements: reduce the 95th-percentile time from seller update to buyer-visible availability, lower cancellation rate attributable to stale stock, and preserve catalog uptime.
  • I mapped the current data flow with engineers and operations, identifying where updates were queued, retried, or manually corrected. This exposed different definitions of “available” across teams, so I facilitated agreement on a shared event contract before feature planning.
  • I broke the work into milestones: instrumentation and baseline, event-driven updates for a narrow seller cohort, reconciliation tooling, then staged expansion. This let us test the architecture and operational process before broad adoption.
  • I made trade-offs explicit. We prioritized idempotent event handling and reconciliation over a seller-facing dashboard redesign, because correctness was the primary risk. I also secured a limited operations rotation for launch rather than assuming the new flow would eliminate exceptions immediately.
  • I ran a weekly dependency review, kept a decision log, and escalated one schema change early when it threatened the rollout date. We agreed on a backward-compatible version instead of forcing both services to deploy together.
  • I set rollout gates with engineering and operations: latency, duplicate-event rate, cancellation trend, and support volume had to remain within agreed limits before increasing traffic.

Result

The staged launch brought inventory-update latency from minutes to under 30 seconds at the 95th percentile for the enabled cohort, and stale-stock cancellations fell 18% over the following eight weeks. The service remained within its availability target, and the shared event contract reduced ambiguity for later integrations. I learned that complex delivery depends as much on agreeing on semantics and operational ownership as on choosing the architecture.

BehavioralMediumWalmartEngineering Manager

3. Tell me about a time senior leadership strongly opposed one of your technical decisions.

The full question

Tell me about a time senior leadership strongly opposed one of your technical decisions. How did you handle it?

Model answer

Situation

At a previous company, I recommended replacing a synchronous dependency in a customer-facing workflow with an asynchronous design. The existing path was contributing to latency spikes and coupling our release schedule to another team. A senior executive strongly preferred a smaller synchronous change because it appeared lower-risk and fit an upcoming business date.

Task

I needed to make a sound technical recommendation while respecting the executive’s business constraints. My responsibility was not to win an architectural argument; it was to make the risk, cost, and options clear enough for us to choose deliberately.

Action

  • I started by asking what the executive was optimizing for: the date, customer experience, operational risk, or longer-term flexibility. That clarified that the date was tied to a customer commitment, while reliability remained a hard requirement.
  • I worked with the engineers to quantify the current failure mode using latency percentiles, timeout rates, and incidents. We documented the asynchronous option’s costs too: queue operations, eventual consistency, retries, and additional monitoring.
  • I presented three choices with explicit consequences: keep the existing design and accept the measured risk; make a narrow synchronous fix with a limited scope; or build the asynchronous path in stages. I recommended the staged option, but made clear what we could deliver safely by the date.
  • When the executive challenged the recommendation, I listened rather than escalating the disagreement. I proposed a short technical spike and a load test against agreed acceptance criteria, so the decision could be based on evidence rather than authority or preference.
  • We aligned on shipping the narrow mitigation first, with a feature flag and rollback plan, then completing the asynchronous work behind the same interface. I kept the executive and partner teams updated as the evidence and forecast changed.

Result

The mitigation met the customer date, and the staged redesign later reduced tail latency and removed the most frequent timeout failure. The approach also preserved a productive relationship with leadership because we made the trade-offs explicit and committed to measurable decision criteria. I learned to challenge strongly while staying curious about the business constraint behind the disagreement.

What interviewers listen for

  • Respectful disagreement grounded in customer and operational evidence.
  • Clear options, trade-offs, and decision ownership—not “I convinced them.”
  • A safe path to validate, deliver, and roll back.
BehavioralMediumWalmartEngineering Manager

4. Give an example of a time you went beyond your defined responsibilities to help a broader organizational initiative succeed.

Model answer

Situation

At a mid-sized company, our annual planning process depended on teams producing comparable reliability and capacity plans, but the work was fragmented across engineering groups. I was responsible for one product area, while a broader initiative to improve planning had no clear owner; inconsistent assumptions were creating late surprises for leadership and partner teams.

Task

I wanted to help the initiative succeed without letting my own roadmap commitments slip. The challenge was to create something useful across teams, not simply add another process or take ownership away from the leaders already involved.

Action

  • I first spoke with the initiative sponsor and several engineering managers to understand where the process was failing. The common issue was not a lack of documents; it was that teams used different definitions for availability, traffic growth, and operational risk.
  • I proposed a lightweight shared template with a small set of required inputs, explicit assumptions, and an owner for each risk. I kept it intentionally short so adoption would be easier than maintaining each team’s existing bespoke document.
  • I piloted the template with my team and one partner team. We used a concrete example—forecasting a seasonal traffic increase—to test whether the template exposed dependencies and capacity gaps early enough to act on them.
  • I made the work collaborative rather than prescriptive: I asked the pilot teams to edit the template, documented the rationale for each field, and invited the initiative sponsor to review the result before broader rollout.
  • I organized short office hours and a review session for managers, then handed the ongoing governance and template ownership to the sponsor. Meanwhile, I delegated parts of my team’s planning work and protected time for the highest-priority roadmap commitments.

Result

The template was adopted by [N] teams, and planning reviews surfaced [N] material risks early enough to assign owners and mitigation dates. We reduced late planning escalations by [X%] or [X] per quarter, while my team still delivered [key roadmap outcome]. I learned that going beyond my role is most effective when I solve a shared problem, validate the solution with the people who will use it, and leave behind clear ownership rather than becoming a permanent bottleneck.

What interviewers listen for

  • Initiative tied to an organizational outcome, not visibility.
  • Sound prioritization and explicit trade-offs with core responsibilities.
  • Influence without authority and durable ownership after the work.
CodingEasyWalmartStaff EngineerPhone screen

5. Reverse a linked list from one point to another.

Model answer

function reverseBetween(head, left, right) {
  // Positions are 1-based and inclusive. Leave invalid ranges unchanged.
  if (!head || left < 1 || right < left) return head;

  // Validate the right boundary before mutating the list.
  let node = head;
  for (let position = 1; position < right; position++) {
    if (!node) return head;
    node = node.next;
  }
  if (!node) return head;

  const dummy = { next: head };
  let before = dummy;
  for (let position = 1; position < left; position++) {
    before = before.next;
  }

  // Repeatedly move the node after the sublist head to the sublist front.
  const sublistHead = before.next;
  for (let i = 0; i < right - left; i++) {
    const moving = sublistHead.next;
    sublistHead.next = moving.next;
    moving.next = before.next;
    before.next = moving;
  }

  return dummy.next;
}
  • Treat left and right as 1-based, inclusive positions. Validate the range before changing any links so an out-of-bounds request leaves the list untouched.
  • The dummy node handles reversing from the head without a separate case. Each iteration moves the next node to the front of the target segment.

Complexity: O(n) time to reach the segment and O(1) extra space.

CodingEasyWalmartStaff EngineerRound 1: Coding interview

6. Given a string containing only parentheses, braces, and brackets, determine whether the brackets are validly matched and correctly ordered.

Model answer

function isValidBrackets(input) {
  const matchingOpen = {
    ')': '(',
    '}': '{',
    ']': '['
  };
  const openers = new Set(['(', '{', '[']);
  const stack = [];

  for (const char of input) {
    if (openers.has(char)) {
      stack.push(char);
    } else {
      // A closer must match the most recent unmatched opener.
      if (stack.pop() !== matchingOpen[char]) return false;
    }
  }

  return stack.length === 0;
}

// Examples
console.log(isValidBrackets('({[]})')); // true
console.log(isValidBrackets('([)]'));   // false
  • Push opening brackets; for each closer, pop and verify the matching type. This enforces both matching and ordering.
  • At the end, the stack must be empty; otherwise there are unmatched openers.

Complexity: O(n) time and O(n) space in the worst case.

CodingEasyWalmartPrincipal EngineerPhone interview

7. Write a function that sums an array of numbers when the array length is not fixed.

Model answer

// Sums every number in an array of any length. An empty array sums to 0.
function sum(numbers) {
  if (!Array.isArray(numbers)) {
    throw new TypeError('Expected an array of numbers');
  }

  return numbers.reduce((total, value) => {
    if (typeof value !== 'number' || !Number.isFinite(value)) {
      throw new TypeError('Every array element must be a finite number');
    }
    return total + value;
  }, 0);
}

// Examples:
console.log(sum([1, 2, 3])); // 6
console.log(sum([]));        // 0
  • reduce processes any array length without requiring a fixed number of parameters.
  • The initial value 0 gives the empty array a defined result; validation prevents accidental string concatenation or NaN propagation.

Complexity: Time O(n); space O(1) additional space.

CodingMediumWalmartStaff EngineerPersonal Interview

8. Find the shortest path to reach a word using a modification of the edit distance problem.

Model answer

function shortestWordPath(start, target, dictionary) {
  if (start === target) return [start];

  // Words in the dictionary are allowed as intermediate steps.
  // Include the target so it can be reached even if omitted by the caller.
  const words = new Set(dictionary);
  words.add(start);
  words.add(target);

  const wildcardIndex = new Map();
  const deletionIndex = new Map();
  const addToIndex = (index, key, word) => {
    if (!index.has(key)) index.set(key, []);
    index.get(key).push(word);
  };

  // Build indexes for one-character substitutions and insertions.
  for (const word of words) {
    for (let i = 0; i < word.length; i++) {
      const wildcard = word.slice(0, i) + '*' + word.slice(i + 1);
      addToIndex(wildcardIndex, wildcard, word);

      const shorter = word.slice(0, i) + word.slice(i + 1);
      addToIndex(deletionIndex, shorter, word);
    }
  }

  const queue = [start];
  let head = 0;
  const parent = new Map([[start, null]]);

  while (head < queue.length) {
    const current = queue[head++];
    const neighbors = new Set();

    // Same-length words differing by one substitution.
    for (let i = 0; i < current.length; i++) {
      const key = current.slice(0, i) + '*' + current.slice(i + 1);
      for (const word of wildcardIndex.get(key) || []) neighbors.add(word);
    }

    // One deletion: the shorter word must be in the allowed set.
    for (let i = 0; i < current.length; i++) {
      const shorter = current.slice(0, i) + current.slice(i + 1);
      if (words.has(shorter)) neighbors.add(shorter);
    }

    // One insertion: indexed longer words that reduce to current.
    for (const word of deletionIndex.get(current) || []) neighbors.add(word);

    for (const next of neighbors) {
      if (parent.has(next)) continue;
      parent.set(next, current);

      if (next === target) {
        const path = [];
        for (let word = target; word !== null; word = parent.get(word)) {
          path.push(word);
        }
        return path.reverse();
      }

      queue.push(next);
    }
  }

  return [];
}

console.log(shortestWordPath('cat', 'dog', [
  'cat', 'cot', 'cog', 'dog', 'at', 'coat'
]));
// One shortest path: cat -> cot -> cog -> dog
  • Interpret a modification as one insertion, deletion, or substitution; every intermediate word must be in the supplied dictionary. The target is added automatically.
  • Breadth-first search returns a path with the fewest edits. Indexes find neighbors without trying every possible alphabet character.
  • If the intended operation is substitution-only, remove the insertion and deletion neighbor logic.

Complexity: With indexed words, BFS is proportional to the neighbor candidates examined; index construction uses O(S) entries, where S is the total number of characters across words. Index string creation adds work proportional to word lengths.

Product & growthMediumWalmartGroup Product ManagerHiring manager

9. Merchants are unhappy with their current payout process.

The full question

Merchants are unhappy with their current payout process. What would you do?

Model answer

Clarify & scope

I’d first clarify what merchants mean by “unhappy”: late or unpredictable funds, confusing fees, failed payouts, limited payout controls, or poor support. I’d segment by business size, geography, payout method, and risk profile, then focus on the segment with the greatest pain and business exposure. I’d also map the full payout journey—from transaction capture through settlement, reconciliation, and funds arrival—because a complaint about “payouts” may originate upstream.

User segments & pain points

For example, a small merchant managing cash flow daily may value predictable arrival and clear status more than advanced scheduling. A large merchant may prioritize reconciliation, bulk controls, and API reliability. I’d validate these needs with support-ticket analysis, payout telemetry, and interviews, and distinguish product problems from bank or regulatory constraints.

Goals & success metrics

My North Star would be the share of eligible payouts received on time and without merchant intervention. Supporting metrics: median and p95 time to funds, payout failure and retry rates, reconciliation completion, support contacts per 1,000 payouts, and merchant satisfaction. Guardrails would include fraud and loss rates, compliance exceptions, and payout operating cost.

Solutions

I’d compare: (1) clearer status, arrival estimates, and proactive exception alerts; (2) more payout choices, such as schedule and destination, where legally and operationally feasible; and (3) better reconciliation tools and self-service recovery for failed payouts.

Recommendation: Start with reliable visibility and exception handling, alongside fixing the highest-volume root causes of delay or failure. This addresses trust without prematurely adding costly payout rails or complex controls. Then test scheduling and destination flexibility with segments that demonstrate demand.

Prioritization & trade-offs

I’d rank opportunities by merchant impact, frequency, confidence, implementation effort, and risk. A faster payout option may be valuable but adds liquidity, fraud, partner, and compliance costs; I’d model those explicitly rather than treating speed as universally better.

MVP, measurement & rollout

Instrument payout states and reasons first, then pilot status improvements and alerts with a representative merchant cohort. Compare against a holdout, monitor leading indicators daily and guardrails continuously, and expand only if on-time receipt and support burden improve without unacceptable risk. I’d also publish clear eligibility and timing expectations so the product makes promises operations can meet.

Product & growthMediumWalmartProduct Manager

10. How do you prioritize features on a product roadmap?

Model answer

Clarify & scope

I treat a roadmap as a set of choices about customer and business outcomes—not a list of requested features. First I clarify the company strategy, target customer, planning horizon, and constraints such as capacity, regulatory obligations, or critical reliability work. I also distinguish committed work from options we are still validating.

User segments & pain points

I identify the highest-priority customer segments and their most important unmet needs. I combine customer interviews, support themes, product analytics, sales feedback, and market research, while checking whether the loudest request represents a broad problem or a few influential accounts.

Goals & success metrics

I connect each candidate initiative to an outcome, such as activation, retention, revenue, or reduced operating cost. I define a North Star or outcome metric and guardrails—for example, activation lift while maintaining support-contact rate, reliability, and accessibility. I ask how we will know the problem is solved before debating a particular feature.

Solutions

I compare a few approaches, including a smaller experiment or a process change. For a checkout drop-off, options might be simplifying the form, adding a guest path, or improving payment-error recovery. I estimate impact, confidence, effort, dependencies, and reversibility; I also call out whether the work creates strategic leverage or removes a meaningful risk.

Recommendation: I use a lightweight score—such as impact × confidence divided by effort—to structure discussion, not to automate the decision. I then explain the rationale, assumptions, and what we are choosing not to do.

Prioritization & trade-offs

I prioritize across the portfolio, not just within a feature list. A balanced roadmap might reserve capacity for customer outcomes, platform health, and discovery, with the exact allocation based on the business stage and risks. I account for opportunity cost, sequencing, engineering capacity, and the cost of delay. Legal deadlines and severe reliability issues may outrank growth experiments; low-confidence, high-effort ideas usually need discovery first.

MVP, measurement & rollout

I define the smallest valuable release, milestones, owners, dependencies, and decision points. I validate risky assumptions with prototypes or experiments, then ship gradually with instrumentation and a rollback plan. After launch, I compare results with the baseline and guardrails, share what we learned, and revisit the roadmap if evidence changes. The leadership test is whether stakeholders understand both the decision and its trade-offs—not whether every request made the plan.

Product & growthMediumWalmartProduct Manager

11. How would you improve search?

Model answer

Clarify & scope

I’d first clarify what “improve search” means for this product: more relevant results, faster discovery, more purchases, or better support for a particular category. For an e-commerce search experience, I’d assume the goal is to help customers find an appropriate, available product quickly—not simply maximize clicks.

User segments & pain points

I’d segment by intent and search behavior. A shopper searching an exact brand and model needs precise matching; someone searching “easy weeknight dinner” needs discovery and useful filters. I’d initially focus on high-intent shoppers whose searches produce no results, irrelevant results, or repeated query reformulations. I’d also investigate accessibility and mobile users, where typing and scanning results can be harder.

Goals & success metrics

My North Star would be successful search sessions: sessions in which a shopper finds a suitable item and completes a meaningful downstream action, such as adding it to cart or purchasing. I’d pair that with:

  • Relevance: click-through and add-to-cart rate by query type; reformulation and zero-result rates.
  • Customer experience: time to first useful result, search abandonment, and customer feedback.
  • Business and guardrails: conversion and revenue per search, alongside cancellation/return rates, availability, latency, and exposure across brands or sellers.

I would not optimize click-through alone: a misleading result can earn a click but harm trust or increase returns.

Solutions

I’d compare three options: improve query understanding (synonyms, spelling, intent); improve ranking (relevance, availability, price, ratings, and delivery promise); and improve result exploration (filters, facets, and clearer product attributes). Recommendation: start with the largest evidenced failure mode. If zero-result and reformulation rates are high, address query understanding first; if customers see results but don’t engage, test ranking and result presentation.

flowchart LR
  A[Customer query] --> B[Understand intent]
  B --> C[Retrieve candidates]
  C --> D[Rank relevant available items]
  D --> E[Show results and filters]
  E --> F[Measure useful outcomes]
  F --> B
Diagram

Prioritization & trade-offs

I’d use impact, confidence, effort, and risk to sequence work, while separating quick fixes—such as common synonym coverage—from model or indexing changes. More personalization may improve relevance but can reduce transparency, introduce bias, or make results inconsistent; I’d test it against a strong non-personalized baseline.

MVP, measurement & rollout

I’d review query-level data and customer research, ship one targeted change behind an experiment, and compare results by category, device, and intent. Roll out gradually only if successful searches improve without worsening latency, availability visibility, returns, or customer trust. I’d partner with engineering, design, data science, merchandising, and operations because search quality depends on catalog data as well as ranking.

Product & growthMediumWalmartProduct Manager

12. What ideas do you have for improving Walmart.com?

Model answer

Clarify & scope

I’d first clarify whether the goal is to improve conversion, customer retention, marketplace growth, or the overall shopping experience. I’ll assume the objective is to help customers reliably find the right item at a competitive total cost, while improving profitable digital growth. Walmart.com serves very different needs—from weekly grocery replenishment to electronics research—so I would avoid treating every shopping mission alike.

User segments & pain points

I’d segment by shopping mission and identify one initial focus: customers buying a mix of groceries and household essentials for pickup or delivery. Their key pain points may be uncertainty about item availability and substitutions, difficulty comparing relevant options, and friction moving between discovery and fulfillment. I’d validate these with funnel data, search logs, customer research, and contacts to support.

Goals & success metrics

My North Star would be successful, profitable orders per active customer—not raw conversion alone. Leading measures could include search-to-product engagement, add-to-cart rate, and checkout completion. Guardrails should include cancellation and substitution rates, on-time fulfillment, returns, customer satisfaction, price competitiveness, and contribution margin. I’d segment all metrics by mission, channel, geography, and new versus returning customer.

Solutions

  • Make availability and fulfillment choices clearer on search and product pages, including pickup and delivery timing before customers commit.
  • Improve search relevance with intent-aware ranking, strong handling of common synonyms, and filters that reflect the category and shopping mission.
  • Reduce basket friction with clearer substitution preferences, easy reordering of frequently bought essentials, and a more coherent mixed-cart experience.

Recommendation: I’d start with a mission-aware search and availability experience for a carefully selected set of categories and markets. It addresses discovery and fulfillment together, while letting us test whether better relevance is actually useful when a product cannot be delivered as promised.

Prioritization & trade-offs

I’d score opportunities by customer impact, reach, confidence, effort, and operational dependency. Search improvements can have broad reach, but ranking changes must not over-promote unavailable or low-quality items. I’d partner early with merchandising, store operations, and fulfillment teams; a digital promise that the store cannot keep harms trust.

MVP, measurement & rollout

I’d instrument the current journey, establish a baseline, then run an A/B test in a limited category and geography. The MVP would expose accurate availability and relevant filters without rebuilding the entire search stack. I’d expand only if it improves successful orders and customer satisfaction without worsening cancellations, substitutions, or margin. A longer-term roadmap could then address personalized discovery and richer cross-category shopping, guided by measured customer needs.

System designMediumWalmartStaff EngineerRound 2 - Technical

13. Design a rate limiter that limits HTTP connections from a domain to a specific threshold over the last five minutes.

Model answer

1. Requirements & scale

  • Limit connection attempts for each normalized domain to a configured threshold N in any rolling five-minute window. Clarify whether the limit counts attempts or only admitted connections; I will count admitted connection attempts.
  • Reject excess attempts quickly and consistently across all service instances. Support changing thresholds and provide a Retry-After hint.
  • Target p99 limiter latency below 5 ms at the edge and high availability. A rolling log provides exact window semantics; a sliding counter is a cheaper approximation if small boundary errors are acceptable.

Back-of-the-envelope: Assume 100,000 active domains, N = 300, and 30,000 checks/s peak. At most 30 million admitted events are retained. At roughly 50 bytes per event before index overhead, that is 1.5 GB raw; plan several times that for sorted-set overhead and replication. Actual sizing must use measured domain distribution and request volume.

2. High-level architecture

flowchart TD
  subgraph Client
    C[HTTP Client]
  end
  subgraph Edge CDN
    E[Domain Normalizer]
  end
  subgraph Load Balancer
    L[Ingress Balancer]
  end
  subgraph API Services
    A[Connection Gateway]
    R[Limiter Service]
  end
  subgraph Cache
    K[Threshold Cache]
  end
  subgraph Datastores
    D[Redis Cluster]
    S[Config Database]
  end
  subgraph Message Queue
    Q[Audit Queue]
  end
  subgraph Workers
    W[Metrics Worker]
  end
  C -->|connection attempt| E
  E -->|canonical domain| L
  L -->|route| A
  A -->|check domain limit| R
  R -->|threshold lookup| K
  K -->|miss| S
  R -->|atomic rolling window update| D
  R -->|allow or reject| A
  A -->|decision event| Q
  Q -->|asynchronous metrics| W
Diagram

3. API design

  • POST /v1/limits/check: internal gateway call with domain, request_id, and optional limit_key; returns allowed, remaining, and retry_after_ms.
  • PUT /v1/limits/{domain}: authorized configuration update for threshold and policy.
  • GET /v1/limits/{domain}: operational read of policy and current usage, preferably from a diagnostic path rather than the hot path.

4. Data model & storage

  • Redis sorted set per normalized domain: key rl:{domain}, score is event time in milliseconds, member is a unique request ID. Hash-tagging keeps one domain's key on one Redis shard.
  • SQL configuration table stores domain, threshold, window duration, policy version, and update time. Cache policy reads locally with a short TTL and push invalidations.
  • Do not persist every decision synchronously. Emit sampled or batched audit events to the queue.

5. Deep dive

For each request, run one atomic Redis Lua operation: remove events with timestamp at or before now - 300000; read the remaining cardinality; if it is below N, add this request with a unique member and allow it; otherwise reject without adding it. Return the oldest retained timestamp so the gateway can calculate a retry hint. Use Redis server time, or tightly synchronized clocks with a documented skew allowance, so different application hosts cannot disagree about the window.

The operation must be atomic: separate prune, count, and insert commands can race and admit more than the limit. Make retries idempotent by using a stable request ID and checking whether that member already exists. Set key expiry after the latest event plus the window to reclaim inactive domains. Protect Redis with connection pooling, bounded script execution, and per-domain limits on pathological key cardinality.

If Redis is unavailable, choose policy explicitly. For abuse-sensitive endpoints, fail closed; for availability-critical traffic, use a conservative local emergency limiter and mark decisions as degraded. Local fallback cannot preserve a globally exact limit, so alert on its use.

6. Scale, bottlenecks & trade-offs

  • Shard by domain; replicate Redis for availability. A single very hot domain remains a hot key, so isolate it, apply edge-level protection, or use a dedicated limiter partition.
  • Exact sliding logs have cost proportional to admitted events. A sliding-window counter uses two buckets and is much cheaper, but can exceed the true rolling limit near bucket boundaries.
  • The decision path is synchronous because admission depends on it; metrics and audit are asynchronous. Keep config reads off the hot path.
  • Monitor allow/reject rate, Redis p50/p99 latency, script errors, active key count, event cardinality, clock skew, and fallback rate. Alert on sudden domain concentration and policy-cache staleness.
  • Treat the domain identity as security-sensitive: derive it from trusted routing or validated host metadata, not an arbitrary client header. Document whether subdomains share a parent-domain quota.
System designMediumWalmartSenior Engineering Manager

14. How would you design a URL-shortening system like bit.ly, and what database and architecture would you use?

Model answer

1. Requirements & scale

Functional requirements

  • Create a short URL for a long URL, optionally with a custom alias or expiration.
  • Redirect a short URL quickly and reliably; support disable/delete and basic analytics.
  • Prevent abuse, validate destinations, and provide a way to report malicious links.

Non-functional requirements

  • Redirects are read-heavy, globally available, and low latency; target p99 under 100 ms at the edge.
  • Short codes must be unique. Creation should be durable, and redirect reads may be eventually consistent across regions.
  • Protect against enumeration, phishing, spam, and traffic spikes.

Back-of-the-envelope: Assume 100 million new links/month and a 100:1 read/write ratio. That is about 40 writes/s and 4,000 redirects/s on average; design for roughly 10× peak, or 400 writes/s and 40,000 reads/s. At five years of retention, 6 billion links × roughly 500 bytes per row is 3 TB raw. Indexes and replication could bring this to 6–10 TB. A 1 KB redirect response at peak is about 40 MB/s before caching.

2. High-level architecture

flowchart TD
  subgraph Client
    U[Browser or App]
  end
  subgraph EdgeCDN["Edge/CDN"]
    E["CDN and WAF"]
  end
  subgraph LoadBalancer["Load Balancer"]
    L["Global Load Balancer"]
  end
  subgraph APIServices["API / Services"]
    R["Redirect Service"]
    C["Create API"]
    A["Abuse Checks"]
  end
  subgraph Cache
    K["Redis Cache"]
  end
  subgraph Datastores["Datastores"]
    D["Distributed KV Store"]
    P["SQL Metadata DB"]
  end
  subgraph MessageQueue["Message Queue"]
    Q["Analytics Events"]
  end
  subgraph Workers
    W["Analytics and Safety Workers"]
  end
  U -->|"short URL"| E
  E -->|"cache miss"| L
  L -->|"GET code"| R
  R -->|"lookup"| K
  K -->|"miss"| D
  R -->|"redirect event"| Q
  U -->|"create request"| E
  E -->|"POST create"| L
  L --> C
  C --> A
  C -->|"write mapping"| D
  C -->|"owner and policy"| P
  Q --> W
Diagram

3. API design

  • POST /v1/links — create a link; accepts url, optional customAlias, expiresAt, and an idempotency key.
  • GET /{code} — resolve and issue a 301 or 302 redirect. Use 302 when destinations may change or click attribution matters.
  • GET /v1/links/{code}/analytics — return aggregated counts for an authorized owner.
  • DELETE /v1/links/{code} — disable a link, with ownership and audit checks.

4. Data model & storage

  • A distributed key-value store (for example, DynamoDB or Cassandra) is the redirect source of truth: code -> destination, status, createdAt, expiresAt, ownerId.
  • Partition by code; use a hash-based distribution to avoid hot partitions. Keep owner and policy metadata in SQL if relational queries and transactions are useful.
  • Redis caches popular mappings with a TTL bounded by link expiration. The cache is an optimization, not the authority.
  • Send click events to a queue and aggregate asynchronously into an analytics store. Do not synchronously write every click to the link database.

5. Deep dive

Generate codes using a centrally allocated, collision-free numeric ID encoded as Base62, or use a sufficiently large random code and retry on uniqueness conflicts. Base62 IDs are compact and straightforward, but sequential IDs are enumerable; random IDs reduce enumeration but require collision handling. A practical choice is a random 8–10-character code, a uniqueness constraint at creation, and rate limits. At 62⁸ possibilities, the space is about 2.18×10¹⁴; still, collision checks are mandatory.

For a create request, validate the URL scheme, normalize it, check policy and malware reputation, then write the mapping durably before returning the short URL. For a redirect, check the edge and Redis caches, then read the key-value store on a miss. Cache negative lookups briefly to reduce repeated probing. Publish analytics asynchronously; if the queue is unavailable, redirects should still succeed.

6. Scale, bottlenecks & trade-offs

Replicate read data across regions and route users to a nearby region. Use a globally unique code namespace so creation does not require a cross-region lock. Accept eventual propagation for new links, while ensuring a successful create is durable in its home region. Cache invalidation matters for deletion: use short TTLs, an invalidation event, and a safety check for disabled links where risk justifies the added read.

The primary trade-off is availability versus immediate global consistency. Redirects should generally remain available during a regional failure, while a brief delay in observing a new link is acceptable. Protect hot links with CDN caching, and protect the service with per-IP and per-account rate limits, bot detection, destination scanning, and abuse reporting. Measure redirect success, p50/p99 latency, cache hit rate, creation failures, abuse rates, and queue lag. Avoid storing personally identifiable click data longer than needed.

System designMediumWalmartEngineering ManagerTechnical round

15. How would you design the system for your existing application?

Model answer

1. Requirements & scale

I would first clarify what “our existing application” does, its users, current architecture, and the main pain point. Since those details are not specified, I’ll assume a multi-tenant web application where users manage business records, collaborate, and receive notifications. I would adapt the boundaries and storage choices once I understood the actual product.

  • Functional: authenticate users; enforce tenant and role permissions; create, read, update, and search records; maintain an audit trail; notify users of important changes.
  • Non-functional: 99.9% availability, p95 reads below 300 ms and writes below 500 ms, tenant isolation, encryption, recoverability, and safe deployments.
  • Assumed scale: 1 million monthly active users, 100,000 peak concurrent users, 10 million records, and 5,000 read requests/s with 500 write requests/s.
  • At 2 KB per record, primary record data is about 20 GB before indexes and replicas. At 10 events per write, the event stream peaks around 5,000 events/s. With an average 5 KB response, 5,000 reads/s is about 25 MB/s before compression and cache hits.

2. High-level architecture

flowchart TD
  subgraph Client
    A["Web and Mobile"]
  end
  subgraph Edge_CDN["Edge and CDN"]
    B["CDN and WAF"]
  end
  subgraph Load_Balancer["Load Balancer"]
    C["Regional Load Balancer"]
  end
  subgraph API_Services["API and Services"]
    D["API Gateway"]
    E["Identity and Tenant Service"]
    F["Record Service"]
    G["Notification Service"]
  end
  subgraph Cache["Cache"]
    H["Redis Cache"]
  end
  subgraph Datastores["Datastores"]
    I["SQL Primary and Replicas"]
    J["Search Index"]
    K["Object Storage"]
  end
  subgraph Message_Queue["Message Queue"]
    L["Durable Event Stream"]
  end
  subgraph Workers["Workers"]
    M["Index and Notification Workers"]
  end
  A -->|"HTTPS requests"| B
  B -->|"protected traffic"| C
  C -->|"API calls"| D
  D -->|"auth and tenant checks"| E
  D -->|"record operations"| F
  F -->|"cache lookup"| H
  F -->|"transactional reads and writes"| I
  F -->|"committed change events"| L
  F -->|"file metadata"| K
  D -->|"search query"| J
  L -->|"asynchronous events"| M
  M -->|"index updates"| J
  M -->|"notifications"| G
Diagram

3. API design

  • POST /v1/sessions — authenticate and issue tokens.
  • GET /v1/records/{id} — fetch a record, subject to tenant authorization.
  • POST /v1/records — create a record; accept an idempotency key.
  • PATCH /v1/records/{id} — update selected fields with version checking.
  • GET /v1/search?q=... — search within the caller’s authorized tenant scope.
  • POST /v1/files/presign — obtain a short-lived upload URL.

4. Data model & storage

  • Use a relational database for tenants, memberships, permissions, record metadata, and audit entries. It provides transactions and constraints for core business data.
  • Put tenant_id on every tenant-owned row and use it in indexes and authorization checks. Partition large tables by tenant or time only when measured access patterns justify it.
  • Store large files in object storage; keep file references and ownership metadata in SQL.
  • Use a search index for text queries and Redis for short-lived, invalidatable hot reads. Neither cache nor search index is the source of truth.

5. Deep dive

The key design choice is keeping durable writes correct while allowing search and notifications to be asynchronous. In a single SQL transaction, the Record Service writes the record and an outbox event. A publisher sends outbox rows to the durable stream; workers update the search index and send notifications. This avoids the dual-write failure where the database commits but event publication is lost. Consumers are idempotent because delivery may be repeated.

sequenceDiagram
  participant U as User
  participant A as API
  participant S as Record Service
  participant D as SQL Database
  participant Q as Event Stream
  participant W as Worker
  participant X as Search Index
  U->>A: Create record with idempotency key
  A->>S: Validate identity and tenant access
  S->>D: Commit record and outbox event
  D-->>S: Transaction committed
  S-->>A: Return record identifier
  A-->>U: Success response
  D->>Q: Publish outbox event
  Q->>W: Deliver event at least once
  W->>X: Upsert search document
Diagram

I would define explicit ownership boundaries, SLOs, and on-call responsibilities before launch. I’d migrate incrementally: instrument the current system, establish baselines, move one workload or tenant cohort at a time, and maintain a rollback path.

6. Scale, bottlenecks & trade-offs

  • Scale stateless API services horizontally; use connection pooling and rate limits to protect SQL from bursts.
  • Read replicas can serve eligible reads, but stale reads are a trade-off. Route read-after-write requests to the primary or use a version token.
  • Cache only data with a clear invalidation strategy; tenant-scoped cache keys prevent cross-tenant leaks.
  • Partition SQL only after identifying a real bottleneck. Premature sharding complicates transactions, migrations, and operations.
  • Replicate across availability zones and test backups with restore exercises. Multi-region writes add conflict and consistency complexity; start with a clear regional write owner unless product requirements demand otherwise.
  • Track availability, p95/p99 latency, error rate, database saturation, queue lag, search freshness, cache hit rate, and tenant-level fairness. Alert on user impact, not just infrastructure symptoms.
System designMediumWalmartSenior Engineering ManagerRound 1 - High level design

16. How would you design an Instagram-like application focused on uploading pictures and text?

Model answer

1. Requirements & scale

Functional requirements

  • Users can create accounts, upload a picture with a caption, view a chronological feed, and delete their own posts.
  • The system supports private accounts and follows; users only see content they are authorized to view.
  • Uploads may be large and should tolerate flaky mobile networks.

Non-functional requirements

  • Read availability and durability matter more than perfectly fresh feeds; target 99.95% availability.
  • Feed reads should have p95 latency below 300 ms, excluding image download time.
  • Keep original images durable, serve resized variants efficiently, and enforce privacy at every read path.

Back-of-the-envelope estimates

  • Assume 100M monthly active users, 20M daily active users, and one post per active user per day: 20M uploads/day, or about 230 uploads/second average. At a 10x peak, design for 2,300 uploads/second.
  • At 2 MB per original, that is about 40 TB/day before derivatives. With 3x image variants and metadata overhead, budget roughly 150 TB/day; lifecycle older media to lower-cost storage.
  • If each daily user views 20 feeds of 20 posts, that is 8B feed-item impressions/day, or about 93K items/second average. Caching and pagination are essential.

2. High-level architecture

Clients upload directly to object storage using short-lived signed URLs. Services validate metadata, create durable post records, and publish events for image processing and feed distribution. The feed service checks visibility and returns post metadata plus CDN URLs.

flowchart TD
  subgraph Client
    A[Mobile App]
  end
  subgraph Edge
    B[CDN]
  end
  subgraph Load Balancer
    C[API Gateway]
  end
  subgraph API Services
    D[Post Service]
    E[Feed Service]
    F[Identity Service]
  end
  subgraph Cache
    G[Redis]
  end
  subgraph Datastores
    H[Post SQL]
    I[Social Graph]
    J[Object Storage]
  end
  subgraph Message Queue
    K[Event Queue]
  end
  subgraph Workers
    L[Image Workers]
    M[Feed Workers]
  end
  A -->|API calls| C
  A -->|image upload and download| B
  B -->|media| J
  C -->|authenticated requests| D
  C -->|feed reads| E
  C -->|tokens| F
  D -->|post metadata| H
  D -->|follow checks| I
  D -->|upload event| K
  K -->|image jobs| L
  L -->|variants| J
  K -->|post events| M
  M -->|feed entries| G
  E -->|feed cache| G
  E -->|post lookup| H
  E -->|visibility| I
Diagram

3. API design

  • POST /v1/uploads — request a signed upload URL and upload ID.
  • POST /v1/posts — finalize an upload and create a post with caption and visibility.
  • GET /v1/feed?cursor=...&limit=20 — return an authorized, paginated feed.
  • DELETE /v1/posts/{postId} — delete a post and enqueue media cleanup.
  • POST /v1/follows — follow an account, subject to privacy rules.

4. Data model & storage

  • Post SQL: posts(post_id, author_id, caption, media_key, visibility, created_at, status). Partition by time or hash of post_id; index (author_id, created_at).
  • Social graph: directed follower/following edges partitioned by user_id, supporting fan-out and privacy checks.
  • Feed cache: per-user ordered post IDs with cursor and expiry. Treat it as rebuildable, not the source of truth.
  • Object storage: immutable original and derivative objects keyed by post ID and variant; CDN caches public or authorized media according to policy.

5. Deep dive

The upload is a two-phase workflow: reserve an upload, transfer bytes directly to storage, then finalize. This keeps large payloads off application servers. The finalize endpoint verifies ownership of the upload ID, object existence, size, type, and checksum before making a post visible. An idempotency key prevents retries from creating duplicate posts.

sequenceDiagram
  participant App
  participant API
  participant Store
  participant Queue
  participant Worker
  App->>API: Request signed upload
  API-->>App: Signed URL and upload ID
  App->>Store: Upload image directly
  App->>API: Finalize post with idempotency key
  API->>Store: Verify object and metadata
  API->>Queue: Publish post created event
  API-->>App: Post ID and processing status
  Queue->>Worker: Generate image variants
  Worker->>Store: Save variants
Diagram

For feeds, use a hybrid fan-out strategy. For ordinary accounts, post events append IDs to followers’ feeds asynchronously. For very high-follower accounts, avoid writing millions of feed rows per post; merge their recent posts at read time. Use cursors rather than offsets, and recheck visibility when serving cached IDs. Eventual consistency is acceptable for feed appearance, but authorization and deletion checks must be current.

6. Scale, bottlenecks & trade-offs

  • Partition post and graph data, replicate across availability zones, and serve image variants through a CDN. Monitor upload success, feed p95 latency, queue lag, image-processing time, storage cost per active user, and authorization failures.
  • Queue consumers must be idempotent; use retries with backoff and a dead-letter queue. If image processing is delayed, show a processing state rather than exposing an incomplete post.
  • SQL gives reliable post creation and ownership constraints; a graph or wide-column store may scale follower traversal better. Choose based on measured graph access patterns, not fashion.
  • Prefer asynchronous feed fan-out for latency, accepting temporary staleness. Keep the post record authoritative and rebuild derived feeds after failures.
  • Protect against hot celebrities, abusive uploads, and CDN cache leakage. Apply rate limits, content validation, signed private-media delivery, retention policies, and deletion propagation. Roll out fan-out and storage changes behind flags with shadow reads and gradual traffic shifts.
TechnicalEasyWalmartProduct Manager

17. What programming experience do you have?

Model answer

  1. Be specific about your hands-on level - I’d name the languages and tools I have actually used, how recently I used them, and whether my experience is professional, academic, or personal. For example: “I’m strongest in [language], which I used recently for [project]; I also have working familiarity with [tool or language].”
  2. Give one concrete example - I’d describe a small project or analysis: the problem, what I personally implemented, and how I tested it. For instance, I might explain how I used scripts to clean event data, validate metrics, or prototype a workflow—only if that reflects my real experience. - I’d mention the technical concepts I can reason about, such as APIs, data structures, SQL, testing, or debugging, and distinguish those from areas where I rely on engineering partners.
  3. Connect it to product work - As a PM, I use technical fluency to ask better questions, spot integration and data risks, evaluate trade-offs, and communicate clearly with engineers. I don’t present myself as a substitute for a software engineer; I make sure I understand enough to frame problems and make informed product decisions.
  4. Be candid about limits and learning - I’d close with what I’m currently improving and how I learn—for example, building a small prototype or reviewing code with an engineer. A strong answer is accurate about depth, not a list of languages intended to impress.

What interviewers listen for: honest calibration, practical evidence, technical curiosity, and the ability to partner effectively with engineering.

TechnicalEasyWalmartEngineering Manager

18. Can you speak another language, such as an Asian language?

Model answer

I’d answer this honestly and briefly, because language ability is personal and shouldn’t be implied if it isn’t real. For example:

  1. If I do speak another language: “Yes. I speak [language] at [conversational/professional/native] level. I’ve used it in [work, study, or daily life], and I’m comfortable with [specific situations]. I’d be transparent about areas where I’m still learning.”
  2. If I don’t: “I don’t currently speak another language fluently. I’m comfortable working with colleagues across language and cultural differences, and I use translation or interpretation support when needed. I’m also open to learning.”
  3. If the interviewer names an Asian language: “I [do/do not] speak [language]. If useful, I can briefly describe my proficiency or have a simple conversation, but I wouldn’t want to overstate it.”

As an Engineering Manager, I’d also distinguish language fluency from inclusive communication: invite different perspectives, document decisions clearly, and avoid making language proficiency a proxy for technical ability.

TechnicalEasyWalmartPrincipal Engineer

19. What is the difference between == and === in JavaScript?

Model answer

  1. == uses abstract equality. JavaScript may coerce one or both operands to a common type before comparing them. For example, 5 == "5" is true, and null == undefined is true.
  2. === uses strict equality. It does not coerce types: both type and value must match. For example, 5 === "5" is false.
  3. Practical guidance: Prefer === and !== because their behavior is more predictable. Use == only when the coercion is intentional and clearly understood; a common deliberate case is value == null, which matches both null and undefined.
  4. Important nuance: Strict equality does not make all values intuitive. NaN === NaN is false, and objects compare by identity, so {} === {} is false. Use Number.isNaN for NaN, and compare object fields when value equality is needed.
TechnicalMediumWalmartStaff EngineerRound 2: Projects explanation

20. Can you explain the architecture of your current project?

Model answer

I’d answer this with a clear end-to-end picture, then go deeper on the parts that matter most for the role. Since the project details vary, I’d adapt the example below to my actual system rather than imply a specific architecture.

Context and purpose

I’d start by naming the product, its primary users, and the important workload: for example, a customer-facing application with interactive reads and asynchronous background processing. I’d state the scale and key constraints I can share, such as peak request volume, latency targets, availability goals, or data sensitivity.

Architecture walkthrough

flowchart LR
  U[Users] --> E[Edge and CDN]
  E --> G[API Gateway]
  G --> S[Application Services]
  S --> C[Cache]
  S --> D[Primary Database]
  S --> Q[Message Queue]
  Q --> W[Background Workers]
  W --> D
  W --> O[External Integrations]
Diagram

I’d explain one request path: traffic enters through the edge and gateway, where we handle concerns such as TLS, authentication, routing, and rate limits. Stateless application services enforce business rules and read or write the system of record. Frequently accessed data may be served from a cache. Work that does not need to block the user request is placed on a queue and handled by workers.

Key design choices and trade-offs

I’d identify the database and explain why its data model fits the consistency and query requirements. I’d describe where we accept eventual consistency—for example, between a committed user action and a derived search index—and how we communicate that to clients. I’d also cover service boundaries, data ownership, and whether the system is a modular monolith or independently deployed services, including why that level of complexity is justified.

Reliability and operating the system

I’d describe how we detect and contain failures: timeouts, bounded retries with backoff, idempotency for retried operations, queue dead-letter handling, and graceful degradation when a dependency is unavailable. I’d mention dashboards and alerts tied to user-facing SLOs, such as p95 latency, error rate, and successful completion of critical workflows.

Staff-level leadership angle

I’d make clear which parts I personally owned, which decisions required cross-team alignment, and how the architecture evolved as usage or organizational needs changed. I’d give one concrete trade-off, the alternatives considered, and measurable results. I’d close with the most important known limitation and what I’d change next, showing both technical judgment and ownership beyond my own team.

Practice these out loud, don't memorise them

Reading an answer is not the same as being able to give one under pressure. ChannelPulse plays the interviewer, asks the follow-ups, and scores each answer with feedback and a model answer so you can hear the gap between what you said and what lands.

Get ChannelPulse Browse all questions