Skip to content

Walmart Interview Questions and Answers (2026)

Walmart’s India tech hiring runs through Walmart Global Tech - its engineering organisation for e-commerce, supply chain, and enterprise platforms - via a 4-stage DSA-plus-system-design loop that mirrors other large product companies, not a retail-store process.

Round Duration What they test
Online Assessment 90 min ~25 CS-fundamentals MCQs + 2 DSA problems (LeetCode Medium)
Technical Round 1 45-60 min DSA (1-2 problems) + OOPs + SQL
Technical Round 2 45-60 min Low-level/object-oriented design + project deep-dive
HR 20-30 min Behavioural + culture fit

A 90-minute timed screen on HackerEarth or HireVue mixing CS-fundamentals MCQs with 2 DSA coding problems at LeetCode-Medium difficulty. This is the highest-volume filter in the process - clean, fully-passing solutions matter more than clever partial ones.

Common questions

  • IPv4-address validation - return a boolean array marking each address valid/invalid
  • Rain-water-trapping style array problems
  • DFS-based grid/graph traversal problems
  • CS-fundamentals MCQs on OOPs, DBMS, and OS basics

A 45-60 minute DSA-focused round (often on HirePro) that opens with a short introduction, then moves into 1-2 medium-level coding problems, followed by OOPs and SQL questions.

Common questions

  • Top-K frequent elements - expects heap or bucket-sort approach
  • Shortest path in a grid - expects BFS
  • Find the second-highest salary in an employee table (SQL)
  • OOPs fundamentals - polymorphism, inheritance, and where you’ve applied them

Shifts from pure coding to low-level/object-oriented design plus a detailed project discussion. For freshers this stays at OOD and basic database-schema-modeling depth rather than full high-level architecture; domain chat around inventory, cart/checkout, or search is common.

Common questions

  • Design the classes for a small system (e.g. a shopping cart or inventory service)
  • Merge overlapping delivery-slot intervals - expects an interval-merge approach
  • Walk through your project’s architecture, the hardest bug you hit, and what you’d rebuild
  • Discuss inventory or cart/checkout bottlenecks and failure modes in plain language

Round-by-round narratives are on the Walmart interview experience page.

A closing 20-30 minute conversation on motivation, ownership, and logistics (relocation to Bangalore or Chennai, notice period). Concrete, results-oriented answers outperform generic slogans.

Common questions

  • Tell me about yourself and why Walmart
  • Tell me about a time you helped a customer or teammate even though it wasn’t strictly your job (servant leadership)
  • How would you balance cost efficiency with a good customer experience in a large-scale retail operation?
  • Working with unclear requirements - walk me through an example

Sample answer frameworks for each of these are on the Walmart HR interview questions page.

Walmart’s India engineering hiring goes through Walmart Global Tech (Bangalore, Chennai), which builds the e-commerce, supply chain, and enterprise software used across Walmart and Sam’s Club - a DSA-plus-system-design loop like Amazon or Flipkart’s. This is entirely separate from Walmart’s retail/store-associate hiring in the US, which does not run a technical interview process. If you’re prepping from this page, you’re prepping for the Global Tech software track.

Common technical interview questions and answers

Section titled “Common technical interview questions and answers”
Q: How do you validate an IPv4 address in code?

Split the string on dots and reject it unless there are exactly four parts. Each part must be non-empty, at most three characters, made only of digits, and numerically between 0 and 255 inclusive. The edge case interviewers always check is leading zeros - “01” and “00” are invalid, so reject any part longer than one character that starts with “0”. Validation is O(1) per address because the length is bounded, so scoring an array of n addresses into a boolean array is O(n). Avoid relying on a language’s built-in parser, since many of them accept octal or shortened forms that the problem considers invalid.

Q: How do you solve the trapping rain water problem in O(n) time and O(1) space?

Water above bar i equals min(maxLeft, maxRight) - height[i], where maxLeft and maxRight are the tallest bars on each side. The naive version computes those per index in O(n^2); prefix and suffix max arrays bring it to O(n) time with O(n) space. The optimal version uses two pointers starting at both ends with running leftMax and rightMax: whichever side has the smaller height is the limiting one, so you can safely add leftMax - height[left] (or the mirror on the right) and move that pointer inward. That is O(n) time and O(1) space, and the key insight to say aloud is that the smaller side’s answer is already determined by its own running max.

Q: How do you find the Top-K frequent elements, and what is the complexity?

Count frequencies in a hash map in O(n), then extract the top K. Using a min-heap of size K and pushing each of the d distinct entries while popping when the heap exceeds K gives O(d log K) time and O(d + K) space, which is the standard answer. Bucket sort does better: create an array of n+1 buckets indexed by frequency, drop each element into its bucket, then walk from the highest bucket downwards collecting K elements - that is O(n) time overall because a frequency can never exceed n. Quickselect on the frequency list is another linear-average option. Mention the heap version first, then offer bucket sort as the improvement.

Q: Write a SQL query to find the second-highest salary.

The safest form uses DENSE_RANK, which handles ties correctly: SELECT DISTINCT salary FROM (SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk FROM employees) t WHERE rnk = 2;. A simpler classic is SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);, which returns NULL rather than erroring when no second salary exists. The LIMIT 1 OFFSET 1 form on a DISTINCT ordered list also works but returns nothing at all in the empty case, which some interviewers count against you. Note that RANK would leave gaps after ties, so DENSE_RANK is the right window function here.

Q: How do you find the shortest path in an unweighted grid?

Use BFS from the source, pushing the start cell into a queue with distance zero and expanding to its four (or eight) neighbours that are in bounds and not blocked, marking each visited as you enqueue it - not as you dequeue it, or cells get queued multiple times. The first time you pop the target you have its shortest distance, because BFS visits cells in nondecreasing distance order. Complexity is O(RC) time and O(RC) space for an R by C grid. DFS is wrong here since it finds some path, not the shortest; if the grid has non-uniform move costs you need Dijkstra, or 0-1 BFS with a deque when costs are only zero or one.

Q: How do you merge overlapping intervals, such as delivery slots?

Sort the intervals by start time, then sweep once: keep the current merged interval, and for each next interval, if its start is less than or equal to the current end, extend the current end to the maximum of the two ends; otherwise push the current interval to the output and start a new one. Sorting dominates at O(n log n) time, with O(n) space for the result. The details interviewers check are whether touching intervals like [1,3] and [3,5] should merge - clarify that up front - and remembering to append the final in-progress interval after the loop ends.

Q: Explain polymorphism with a concrete example from a retail system.

Polymorphism lets one interface stand for many implementations. Compile-time polymorphism is overloading - several addItem methods differing in parameters, picked by the compiler. Run-time polymorphism is overriding - a DiscountPolicy interface with a calculate(cartTotal) method implemented by PercentageDiscount, FlatDiscount, and BuyOneGetOne, where the checkout service holds a DiscountPolicy reference and the JVM dispatches to the actual object’s method at run time. The practical payoff is that adding a festival discount means writing one new class rather than editing a growing switch statement inside checkout, which is the Open/Closed Principle in action. The mechanism underneath is the virtual method table the runtime consults on each call.

Q: How would you design the classes for a shopping cart service?

Start with the entities: Product (id, name, price, taxCategory), CartItem (product reference, quantity, line total), and Cart (cart id, customer id, list of CartItem, plus addItem, removeItem, and updateQuantity methods that keep the totals consistent). Keep pricing out of Cart - inject a PricingService and a DiscountPolicy interface so promotions can vary without touching cart logic - and keep persistence behind a CartRepository interface. Store the price captured at add-time on the CartItem, not only a live lookup, so a mid-session price change does not silently alter what the customer saw. On the schema side, a carts table plus a cart_items table with a unique constraint on (cart_id, product_id) prevents duplicate lines, and checkout should convert the cart into an immutable Order rather than mutating it further.

Frequently asked questions about Walmart interviews

Section titled “Frequently asked questions about Walmart interviews”
What is the Walmart interview process for freshers?

Walmart Global Tech India’s SDE process usually runs 4 stages: 1. Online Assessment (90 min) - roughly 25 CS-fundamentals MCQs plus 2 DSA coding problems (LeetCode Medium), on HackerEarth/HireVue. 2. Technical Interview 1 (45-60 min) - 1-2 more DSA problems plus OOPs and SQL. 3. Technical Interview 2 (45-60 min) - low-level/object-oriented design and a detailed project discussion. 4. HR / hiring-manager round (20-30 min) on motivation, ownership, and fit. Total timeline is roughly 3-6 weeks.

Is Walmart’s India hiring for retail store jobs or software roles?

This page covers Walmart Global Tech India - the engineering org behind Walmart’s e-commerce, supply chain, and enterprise platforms, based mainly in Bangalore and Chennai. It hires SDEs through a DSA-plus-system-design loop similar to other product companies, not through retail/store-associate hiring, which runs a completely different process.

What questions are asked in Walmart interviews?

Reported coding questions include an IPv4-address-validation problem (return a boolean array marking each address valid/invalid), the rain-water-trapping problem, DFS-based grid/graph problems, Top-K frequent elements (heap/bucket sort), and shortest path in a grid (BFS). SQL questions like finding the second-highest salary in a table are common, alongside OOPs fundamentals. Later rounds bring domain discussion around inventory, cart/checkout, and search.

How many rounds are there in the Walmart interview?

Typically 4: an Online Assessment, two Technical Interviews (the first DSA-heavy, the second leaning into LLD/system design and project depth), and a closing HR/managerial round. Some drives compress this to 3 rounds or fold HR into the final technical round.

How should I prepare for Walmart interviews?

Drill LeetCode Medium-level DSA (arrays, graphs, intervals, heaps) since both the OA and Technical Round 1 lean on it. Revise OOPs and SQL - second-highest-salary-style queries come up often. For the design round, freshers get object-oriented/LLD questions (class design, basic DB schema) rather than full HLD, so practice designing a small system (e.g. a cart or inventory service) end-to-end. Keep one detailed project story ready for stack choices and the hardest bug you debugged.

What does Walmart Global Tech pay freshers in India?

Candidate reports put SDE-1 packages roughly in the ₹18-25 LPA range (base plus stock), though this varies by year, college tier, and role. Confirm the exact figure on your offer letter rather than relying on aggregated reports.

Looking for placement papers, OA practice, or coding questions?

Section titled “Looking for placement papers, OA practice, or coding questions?”