Walmart Labs Interview Prep (SDE 2 / SDE 3)

Walmart Global Tech, still widely called Walmart Labs, runs one of the broadest DSA question sets on this site, and the coding rounds are a real filter rather than a formality. Expect medium problems with optimisation follow-ups, and expect the interviewer to keep pushing after your first working solution.

The loop’s distinctive round, especially in India, is machine coding: you get a written problem statement and a block of time to produce running, extensible code, usually in memory with no database. It is graded like a small pull request. The design rounds then live squarely in retail and supply chain — inventory that must not oversell, carts, orders, fulfillment across stores and distribution centres, and traffic that triples on a known calendar date.


Interview Process

Stage Duration Focus
Online Assessment 60-90 min 2-3 coding problems, sometimes with SQL
Technical Screen 45-60 min DSA, medium, with follow-ups
Machine Coding / LLD 60-120 min Working code from a written spec
Onsite: DSA 45-60 min Problem solving pushed toward optimal
Onsite: System Design 60 min Retail scale, weighted heavily from SDE 3
Hiring Manager / Behavioural 45-60 min Ownership, incidents, cross-team work

The machine coding round is not universal. It is widely reported in India loops and appears in some others, sometimes as a take-home followed by a review discussion rather than a live session. Ask your recruiter whether it is in your schedule and how long you get. Level matters too: SDE 2 loops weight the DSA rounds, while SDE 3 and above are decided largely in system design and the depth of your past-project ownership.


What Walmart Labs Actually Tests

Derived from 152 reported Walmart Labs-tagged problems. Difficulty mix:

Difficulty Count Share
Easy 23 15%
Medium 102 67%
Hard 27 18%

Hard problems are a real but minority share. Medium fluency wins most rounds; Hard shows up late in the loop.

Where those problems fall by pattern:

Rank Pattern Problems Share of list
1 Arrays & Hashing 26 17%
2 Dynamic Programming 21 14%
3 Sliding Window & Two Pointers 19 13%
4 Heap / Priority Queue 11 7%
5 Trees 11 7%
6 Graphs 9 6%
7 Stack & Monotonic Stack 9 6%
8 Binary Search 9 6%
9 Backtracking 8 5%
10 Design (Coding) 7 5%

Walmart Labs Signature Problems

These rank high on Walmart Labs’s list but are reported by few other companies — the questions that are distinctively theirs rather than generic interview classics. The last column is how many of the 142 companies on this site report each one.

# Problem Pattern Difficulty Also asked at Link
1 Divide Intervals Into Minimum Number of Groups Prefix Sum + Heap Medium 7 of 142 LeetCode →
2 Minimum Number of Operations to Make Arrays Similar Greedy Hard 2 of 142 LeetCode →
3 XOR Operation in an Array Bit Manipulation Easy 2 of 142 LeetCode →
4 Count Good Triplets in an Array Merge Sort + Fenwick Tree Hard 4 of 142 LeetCode →
5 Maximum Number of Tasks You Can Assign Monotonic Queue + Binary Search Hard 5 of 142 LeetCode →
6 Max Stack Doubly Linked List + Ordered Set Hard 8 of 142 Solve →
7 Trapping Rain Water II Heap + BFS Hard 10 of 142 Solve →
8 Advantage Shuffle Greedy + Two Pointers Medium 3 of 142 LeetCode →
9 Sort the Matrix Diagonally Matrix + Sorting Medium 4 of 142 LeetCode →
10 Construct Binary Tree from Inorder and Postorder Traversal Divide and Conquer + Binary Tree Medium 7 of 142 LeetCode →
11 Diagonal Traverse Simulation + Matrix Medium 11 of 142 Solve →
12 Non-decreasing Array Array Medium 4 of 142 LeetCode →
13 Subsets II Backtracking + Bit Manipulation Medium 8 of 142 Solve →
14 Count Different Palindromic Subsequences DP Hard 4 of 142 Solve →

If you are short on time, these carry more Walmart Labs-specific signal per hour than the universal top-100 lists.


Reported in the Last Six Months

The recency-filtered slice of Walmart Labs’s list, ranked by how often each was reported. Expect heavy overlap with the all-time classics — that overlap is the point, it means these stay in rotation.

# Problem Pattern Difficulty Link
1 Advantage Shuffle Greedy + Two Pointers Medium LeetCode →
2 Number of Islands Union-Find + BFS Medium Solve →
3 Group Anagrams Sorting + Hash Table Medium Solve →
4 Merge Intervals Quicksort Medium Solve →
5 Top K Frequent Elements Quickselect + Bucket Sort Medium Solve →
6 Best Time to Buy and Sell Stock DP Easy Solve →
7 Container With Most Water Greedy + Two Pointers Medium Solve →
8 Course Schedule DAG + Topological Sort Medium Solve →
9 Course Schedule II Topological Sort + Graph Medium Solve →
10 Delete and Earn DP Medium Solve →
11 Find the Duplicate Number Pigeonhole Principle + Floyd Cycle Medium Solve →
12 Kth Largest Element in an Array Quickselect + Divide and Conquer Medium Solve →
13 Max Stack Doubly Linked List + Ordered Set Hard Solve →
14 Minimum Absolute Difference Sorting + Array Easy Solve →
15 Move Zeroes Two Pointers Easy Solve →

System Design (HLD) Problems Asked at Walmart Labs

# Problem Difficulty Link
1 E-commerce Platform Advanced Read →
2 Cart System Intermediate Read →
3 Payment System Advanced Read →
4 Freight Logistics (Fulfillment Network) Advanced Read →
5 Freight Bidding (Carrier Allocation) Advanced Read →
6 Search Autocomplete (Catalogue Search) Intermediate Read →
7 Notification System (Order Updates) Intermediate Read →
8 Distributed Job Scheduler (Replenishment Runs) Advanced Read →
9 Metrics and Monitoring System Intermediate Read →

LLD / Machine Coding Problems Asked at Walmart Labs

These are the shapes the machine coding round draws from. Practice them by actually typing them against a timer in your own editor, in memory, with a couple of tests and a main method that demonstrates the flows. Reading a solution does not prepare you for producing one in ninety minutes.

# Problem Difficulty Link
1 E-commerce Cart Intermediate Read →
2 Inventory Management Intermediate Read →
3 Order Management System Intermediate Read →
4 Delivery Slot Booking Intermediate Read →
5 Payment Wallet Intermediate Read →
6 Queue Management Intermediate Read →
7 Rate Limiter Intermediate Read →

DSA Problems Asked at Walmart Labs

83 problems across 12 pattern groups. Each group is allocated in proportion to its real share of Walmart Labs’s tagged list, then filled with the highest-frequency problems in that group — so the weight here matches the distribution above rather than burying graph and tree work under the usual array classics.

Sliding Window & Two Pointers

Linear-time scans over arrays and strings. High volume, low variance — these should be automatic. All 14 on the list.

# Problem Pattern Difficulty Link
1 Longest Substring Without Repeating Characters Sliding Window Medium Solve →
2 Middle of the Linked List Linked List + Two Pointers Easy Solve →
3 3Sum Two Pointers Medium Solve →
4 Container With Most Water Greedy + Two Pointers Medium Solve →
5 Maximum Length Substring With Two Occurrences Sliding Window Easy LeetCode →
6 Advantage Shuffle Greedy + Two Pointers Medium LeetCode →
7 Sort Colors Bubble Sort + Quicksort Medium Solve →
8 Next Permutation Two Pointers Medium Solve →
9 Permutation in String Sliding Window + Two Pointers Medium Solve →
10 Move Zeroes Two Pointers Easy Solve →
11 Maximum Sum of Distinct Subarrays With Length K Sliding Window Medium LeetCode →
12 Minimum Window Substring Sliding Window Hard Solve →
13 Next Greater Element III Two Pointers Medium LeetCode →
14 Rotate Array Two Pointers Medium Solve →

Arrays & Hashing

Prefix sums, counting, and grid walks. The warm-up round, and the one people get careless on. All 13 on the list.

# Problem Pattern Difficulty Link
15 Two Sum Hash Table + Array Easy Solve →
16 Count Elements With Maximum Frequency Counting + Hash Table Easy LeetCode →
17 The Winner University Database Easy LeetCode →
18 Rotting Oranges BFS Medium Solve →
19 Sort the Matrix Diagonally Matrix + Sorting Medium LeetCode →
20 Subarray Sum Equals K Prefix Sum Medium Solve →
21 Diagonal Traverse Simulation + Matrix Medium Solve →
22 Set Matrix Zeroes Matrix + Hash Table Medium Solve →
23 Spiral Matrix Simulation + Matrix Medium Solve →
24 Contiguous Array Prefix Sum Medium Solve →
25 First Missing Positive Hash Table + Array Hard Solve →
26 Insert Interval Array Medium LeetCode →
27 Non-decreasing Array Array Medium LeetCode →

Dynamic Programming

State definition is the whole battle. Say the recurrence out loud before you write the table. All 12 on the list.

# Problem Pattern Difficulty Link
28 Trapping Rain Water Monotonic Stack + Two Pointers Hard Solve →
29 Generate Parentheses Bracket Sequences + Backtracking Medium Solve →
30 Number of Ways to Separate Numbers Prefix Sum + DP Hard LeetCode →
31 Coin Change Complete Knapsack + Knapsack Problem Medium Solve →
32 Longest Increasing Subsequence LIS + Binary Search Medium Solve →
33 Maximum Subarray Divide and Conquer + DP Medium Solve →
34 Best Time to Buy and Sell Stock DP Easy Solve →
35 House Robber DP Medium Solve →
36 Palindromic Substrings Two Pointers + DP Medium Solve →
37 Decode Ways DP Medium Solve →
38 Jump Game Greedy + DP Medium Solve →
39 Maximum Product Subarray DP Medium Solve →

Heap / Priority Queue

Top-k, streaming medians, and scheduling. Usually the difference between a passing and a timing-out solution. All 8 on the list.

# Problem Pattern Difficulty Link
40 Divide Intervals Into Minimum Number of Groups Prefix Sum + Heap Medium LeetCode →
41 Maximum Number of Tasks You Can Assign Monotonic Queue + Binary Search Hard LeetCode →
42 Trapping Rain Water II Heap + BFS Hard Solve →
43 Kth Largest Element in an Array Quickselect + Divide and Conquer Medium Solve →
44 Merge k Sorted Lists Tournament Sort + Merge Sort Hard Solve →
45 Top K Frequent Elements Quickselect + Bucket Sort Medium Solve →
46 Meeting Rooms II Prefix Sum + Heap Medium Solve →
47 Meeting Rooms III Heap Hard LeetCode →

Design (Coding)

Build a data structure to a spec. Graded on API shape and the complexity of each operation, not just correctness. All 6 on the list.

# Problem Pattern Difficulty Link
48 LRU Cache Doubly Linked List + Design Medium Solve →
49 Max Stack Doubly Linked List + Ordered Set Hard Solve →
50 Find Median from Data Stream Data Stream + Design Hard Solve →
51 LFU Cache Doubly Linked List + Design Hard Solve →
52 Design Hit Counter Data Stream + Queue Medium Solve →
53 Min Stack Design + Stack Medium Solve →

Trees

Recursion discipline: what you return up, what you pass down. Follow-ups usually push from recursive to iterative. All 5 on the list.

# Problem Pattern Difficulty Link
54 Count Good Triplets in an Array Merge Sort + Fenwick Tree Hard LeetCode →
55 Construct Binary Tree from Inorder and Postorder Traversal Divide and Conquer + Binary Tree Medium LeetCode →
56 Binary Tree Zigzag Level Order Traversal Binary Tree + BFS Medium Solve →
57 Largest Rectangle in Histogram Range Query + Monotonic Stack Hard Solve →
58 Populating Next Right Pointers in Each Node Linked List + Binary Tree Medium LeetCode →

Stack & Monotonic Stack

Nearest-greater, parsing, and span problems. The monotonic variant is the one people miss. All 5 on the list.

# Problem Pattern Difficulty Link
59 Valid Parentheses Bracket Sequences + Stack Easy Solve →
60 First Unique Character in a String Queue Easy Solve →
61 Daily Temperatures Monotonic Stack Medium Solve →
62 Minimum Remove to Make Valid Parentheses Stack Medium Solve →
63 Remove All Adjacent Duplicates in String II Stack Medium Solve →

Strings

Parsing, transformation, and in-place edits. Clarify the character set and whitespace rules before you start. All 5 on the list.

# Problem Pattern Difficulty Link
64 Group Anagrams Sorting + Hash Table Medium Solve →
65 Maximum Distance Between Unequal Words in Array I String + Array Easy LeetCode →
66 Zigzag Conversion String Medium Solve →
67 Integer to Roman Math + Hash Table Medium Solve →
68 Roman to Integer Math + Hash Table Easy Solve →

Graphs

Traversal, connectivity, ordering, and shortest paths. The hardest bucket to fake — either you have drilled it or you have not. All 4 on the list.

# Problem Pattern Difficulty Link
69 Number of Islands Union-Find + BFS Medium Solve →
70 Longest Consecutive Sequence Union-Find Medium Solve →
71 Course Schedule II Topological Sort + Graph Medium Solve →
72 Course Schedule DAG + Topological Sort Medium Solve →

Half of these are binary search on the answer, not on an array. Learn to spot the monotonic predicate. All 4 on the list.

# Problem Pattern Difficulty Link
73 Search in Rotated Sorted Array Binary Search Medium Solve →
74 Median of Two Sorted Arrays Divide and Conquer + Binary Search Hard Solve →
75 Find Minimum in Rotated Sorted Array Binary Search Medium Solve →
76 Find the Duplicate Number Pigeonhole Principle + Floyd Cycle Medium Solve →

Intervals, Greedy & Sorting

Sort, then make a local decision you can defend. Expect to justify why greedy is safe here. All 4 on the list.

# Problem Pattern Difficulty Link
77 Merge Intervals Quicksort Medium Solve →
78 Minimum Number of Operations to Make Arrays Similar Greedy Hard LeetCode →
79 Minimum Operations to Make Array Equal II Greedy Medium LeetCode →
80 Candy Greedy Hard Solve →

Prefix structures and substring matching. Common wherever autocomplete or search is part of the product. All 3 on the list.

# Problem Pattern Difficulty Link
81 Word Break Brute-Force Search + Memoization Medium Solve →
82 Longest Palindromic Substring Manacher + Two Pointers Medium Solve →
83 Longest Common Prefix Trie Easy Solve →

Walmart Labs’s Favourite Patterns (Ranked)

Rank Pattern Frequency Problems on list Start with
1 Sliding Window & Two Pointers Very High 14 (16%) Longest Substring Without Repeating Characters, Middle of the Linked List, 3Sum
2 Arrays & Hashing High 13 (14%) Two Sum, Count Elements With Maximum Frequency, The Winner University
3 Dynamic Programming High 12 (13%) Trapping Rain Water, Generate Parentheses, Number of Ways to Separate Numbers
4 Heap / Priority Queue Medium-High 8 (9%) Divide Intervals Into Minimum Number of Groups, Maximum Number of Tasks You Can Assign, Trapping Rain Water II
5 Design (Coding) Medium-High 6 (7%) LRU Cache, Max Stack, Find Median from Data Stream
6 Trees Medium-High 5 (6%) Count Good Triplets in an Array, Construct Binary Tree from Inorder and Postorder Traversal, Binary Tree Zigzag Level Order Traversal
7 Stack & Monotonic Stack Medium 5 (6%) Valid Parentheses, First Unique Character in a String, Daily Temperatures
8 Strings Medium 5 (6%) Group Anagrams, Maximum Distance Between Unequal Words in Array I, Zigzag Conversion
9 Graphs Medium 4 (4%) Number of Islands, Longest Consecutive Sequence, Course Schedule II
10 Binary Search Medium 4 (4%) Search in Rotated Sorted Array, Median of Two Sorted Arrays, Find Minimum in Rotated Sorted Array

How to read this: the top three rows are where your preparation hours should go. A candidate fluent in Sliding Window & Two Pointers, Arrays & Hashing, Dynamic Programming covers the bulk of what Walmart Labs actually asks. The rest is insurance for the one round that goes somewhere unexpected.


The Machine Coding Round

You get a written spec with several requirements, a time box, and an expectation of running code at the end. It is reviewed like a pull request, and the reviewer usually asks you to add a requirement once you are done.

Signal What strong looks like What weak looks like
First ten minutes Reads the whole spec, lists the entities, writes the class skeleton Starts on requirement one without reading requirement four
Data model Obvious entities with clear ownership and no god class Everything hanging off one manager object
Scope control Core requirements working, extras only if time remains Half-built bonus features and a broken core flow
Testing A few focused tests or a demonstrable main flow that runs Nothing executable at the end
Concurrency Only where the spec asks, and correct where used Threads added for show, with a race in them
Extensibility A new rule or payment type can be added without touching existing classes A switch statement that every change has to modify
Explanation Walks the reviewer through the model and names the trade-offs Reads the code out line by line

Two practical rules. Keep everything in memory unless told otherwise — no database, no framework, no build complexity. And leave the last ten minutes for a tidy-up pass plus a working demonstration, because a reviewer who cannot run your code cannot score it.


Retail and Supply Chain Design: What Actually Gets Probed

Prompts are phrased as product surfaces. The underlying problem is nearly always inventory truth, capacity, or peak load. Map the prompt before you start drawing.

If the prompt is about The real problem is Go deep on
Add to cart and checkout Reservation under concurrency Holds with expiry, conditional writes, idempotent checkout, what the loser of a race sees
Product availability Distributed inventory truth Authoritative ledger versus cached availability, store and warehouse reconciliation, acceptable staleness
Order placement A long-lived state machine Order states, compensation on payment failure, partial cancellation, outbox for downstream events
Delivery or pickup slots Capacity allocation Slot inventory per store and window, overbooking policy, release of abandoned holds
Fulfillment routing Cost and distance optimisation Candidate nodes, scoring by cost and promise date, split shipments, fallback when a node declines
Catalogue search Read-heavy indexed retrieval Inverted index, facets, index freshness after a price or stock change, ranking inputs
Sale or holiday peak Load shedding and queueing Pre-scaling, admission control, degrading non-critical features, retry storms and jitter
Replenishment Scheduled batch at scale Partitioned jobs, idempotent reruns, late data, and what happens when a run overruns its window

The question that separates answers: which number is allowed to be wrong, and for how long? Price and stock staleness are design decisions in retail, and saying so explicitly is what a senior answer sounds like.


Behavioural Round

# Question
1 Tell me about the largest-scale system you have owned. What was the bottleneck?
2 Tell me about a peak-traffic event you prepared for. What did you get wrong?
3 Tell me about an incident you led the response to.
4 Tell me about a time you had to deliver with a dependency that was not ready.
5 Tell me about a design you argued for that the team did not adopt.
6 Tell me about a time you cut scope to hit a date, and what it cost later.
7 Tell me about a time you improved something nobody asked you to improve.
8 Why Walmart Global Tech, and which part of the business interests you?

Retail runs on known peaks and tight margins, so the stories that resonate are about capacity planning, cost awareness, and incidents during high-traffic windows. Quantify what you changed — latency, cost per order, error rate — because the interviewer is listening for an engineer who has watched a dashboard during a sale.


14-Day Prep Plan

Built from the pattern ranking above, so the heaviest topics get the most time.

Day Focus Problems
1 Sliding Window & Two Pointers (part 1) Longest Substring Without Repeating Characters, Middle of the Linked List, 3Sum
2 Sliding Window & Two Pointers (part 2) Container With Most Water, Maximum Length Substring With Two Occurrences, Advantage Shuffle
3 Arrays & Hashing (part 1) Two Sum, Count Elements With Maximum Frequency, The Winner University
4 Arrays & Hashing (part 2) Rotting Oranges, Sort the Matrix Diagonally, Subarray Sum Equals K
5 Dynamic Programming (part 1) Trapping Rain Water, Generate Parentheses, Number of Ways to Separate Numbers
6 Dynamic Programming (part 2) Coin Change, Longest Increasing Subsequence, Maximum Subarray
7 Heap / Priority Queue Divide Intervals Into Minimum Number of Groups, Maximum Number of Tasks You Can Assign, Trapping Rain Water II
8 Design (Coding) LRU Cache, Max Stack, Find Median from Data Stream
9 Trees Count Good Triplets in an Array, Construct Binary Tree from Inorder and Postorder Traversal, Binary Tree Zigzag Level Order Traversal
10 Stack & Monotonic Stack Valid Parentheses, First Unique Character in a String, Daily Temperatures
11 Strings Group Anagrams, Maximum Distance Between Unequal Words in Array I, Zigzag Conversion
12 Mock round Two problems in 45 minutes, timed, no hints. Simulate the real round.
13 Revision Redo the problems you failed or needed a hint on.
14 Light review + rest Re-read your pattern notes. Sleep early.

Tips for Walmart Labs Interviews

  1. Rehearse machine coding with a clock, in your own editor. Ninety to one hundred and twenty minutes from a written spec to running, tested code. In-memory data, a clean class model, no framework, a demonstrable flow. Do this three times before the interview and the round stops being frightening.
  2. Overselling is the retail edge case. Two customers checking out the last unit at the same time. Reservation versus allocation, conditional updates, time-limited holds, and what the loser sees. Volunteer it in any inventory or cart design.
  3. Design for the known peak, not the average. Holiday and sale events are on the calendar, which changes the architecture: pre-warmed capacity, queueing with backpressure, load shedding on non-critical paths, and idempotent retries so a client storm does not double-charge anyone.
  4. Treat inventory as a ledger with derived availability. Stock lives across stores, distribution centres, and in-flight orders. Say which number is authoritative, which is eventually consistent, and how a store system reconciles with online.
  5. Know fulfillment variety. Ship from store, pickup, delivery slots with capacity, split shipments, and partial cancellations. Each one adds state to the order model, and the design round usually walks into at least one.
  6. Drill DSA breadth, not depth. The tagged list above is one of the largest here and spans arrays, strings, trees, graphs, heaps, and dynamic programming at medium level. Broad fluency with optimisation follow-ups is the target.
  7. Bring one project you can diagram end to end. For SDE 3 the loop is decided by whether you can defend an architecture you actually owned, including the parts that went wrong.

Other Company Prep


Round structures, durations, and the presence of the machine coding round reflect commonly reported candidate experience rather than published Walmart Global Tech documentation. The loop varies by level, org, and region, and India loops differ noticeably from US ones. Confirm your round list with your recruiter.