Walmart interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Walmart
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I got a referral to Walmart Global Tech India from one of my friends and have a very long interview process. I was able to crack the interviews. The interview experience was great and smooth.
Application story
I received a referral from one of my friends working at Walmart. The HR department then contacted me to explain the process and asked me to apply through their portal. I received the test link.
Why selected/rejected for the role?
I got selected for the role, but I didn't join because the offered package was less than the offer from the other company.
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, OOPS, OS, Java, Spring boot
Tip
Tip

Tip 1 : Practice DSA questions for all topics - LinkedList, stacks, queues etc.
Tip 2 : Have a proper analysis of the DSA question before attempting it.
Tip 3 : Learn System Design.

Application process
Where: Referral
Eligibility: 8 CGPA
Resume Tip
Resume tip

Tip 1: The resume should be one page. 

Tip 2: All achievements and important details should be highlighted.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date4 Jul 2021
Coding problem2

1. Swap Nodes in Pairs

Moderate
40m average time
60% success
0/80
Asked in companies
Dell TechnologiesWalmartOLX Group

You are given a singly linked list of integers.

Your task is to swap every two adjacent nodes, and return the head of the modified, linked list.

For Example:

We have a linked list 1->2->3->4->5->6->7 and so on. You are supposed to swap pairs of a linked list like swap (1,2), (3,4), (5,6), and so on.
Note:
1. You may not modify the data in the list’s nodes; only nodes themselves may be changed. Because imagine a case where a node contains many fields, so there will be too much unnecessary swap.

2. If a pair of a node does not exist, then leave the node as it is.
Try solving now

2. House Robber

Moderate
26m average time
0/80
Asked in companies
PayPalExpedia GroupGoldman Sachs

A thief wants to loot houses. He knows the amount of money in each house. He cannot loot two consecutive houses. Find the maximum amount of money he can loot.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date8 Jul 2021
Coding problem2

1. Convert a binary tree to its sum tree

Easy
15m average time
85% success
0/40
Asked in companies
AmazonMicrosoftSamsung

Given a binary tree of integers, you are supposed to modify the given binary tree to a sum tree where each node value is replaced by the sum of the values of both left and right subtrees in the given tree. The value of leaf nodes is changed to zero.

Example:
Below is the example showing the input tree and its sum tree.  

alt text

Problem approach

I drew a few trees and asked him for the output for those examples. He asked me to provide it myself, and I did. I thought of performing a post-order traversal since we need to visit the root’s left and right children before visiting the root. In post-order traversal, we keep the sum of the root’s left and right children in a variable called sum. We then take the difference between this sum and the root’s data. If the sum is greater than the root’s data, we replace the root with the sum. Otherwise, we must distribute the root’s value to the root’s left and right children so that all three conditions are satisfied. (We can’t reduce the value at any node). He asked me to write the code for it, and I did.

Try solving now

2. Implement Trie

Hard
41m average time
0/120
Asked in companies
UberAmazonWalmart

Implement Trie Data Structure to support these operations:

insert(word) - To insert a string "word" in Trie
search(word) - To check if string "word" is present in Trie or not.
startsWith(word) - To check if there is any string in the Trie that starts with the given prefix string "word".


Three type of queries denote these operations:

Type 1: To insert a string "word" in Trie.
1 word

Type 2: To check if the string "word" is present in Trie or not.
2 word

Type 3: To check if there is any string in the Trie that starts with the given prefix string "word".
3 word


Problem approach

I wrote a class to implement a character Trie using a vector of nodes as children. He asked me to improve on space. So, I used a HashMap to store the child nodes only if a child exists. I wrote the code for insertion and finding a word and walked him through.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date11 Jul 2021
Coding problem2

1. Maximum Subarray Sum

Moderate
25m average time
75% success
0/80
Asked in companies
CultfitPayPalWalmart

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.


For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.


Given the array [-5, -1, -8, -9], the maximum sum would be -1.


Follow up: Do this in O(N) time.

Problem approach

I used Kadane algorithm here to find subarray with maximum sum. It is a standard question for interview.

Try solving now

2. Edit Distance

Moderate
30m average time
70% success
0/80
Asked in companies
OYOGoldman SachsHCL Technologies

You are given two strings 'S' and 'T' of lengths 'N' and 'M' respectively. Find the "Edit Distance" between the strings.

Edit Distance of two strings is the minimum number of steps required to make one string equal to the other. In order to do so, you can perform the following three operations:

1. Delete a character
2. Replace a character with another one
3. Insert a character
Note:
Strings don't contain spaces in between.
Problem approach

Firstly, I gave the interviewer, a recursive solution then he asked me to reduce complexity as it was exponential of recursive solution, so I gave him a top-down DP solution.

Try solving now
04
Round
Easy
HR Round
Duration30 minutes
Interview date15 Jul 2021
Coding problem1

1. Basic HR Questions

Introduce yourself.

What did you do in the last year to improve your knowledge?

Explain the difference between group and team. Are you a team player?

What is your ideal company or workplace?

Problem approach

Tip 1 : Start by telling about your education.
Tip 2 : Then tell about your technical experiences - what projects you worked on, what was your part in team.
Tip 3 : Lastly, tell that how can you be asset to the organization

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Walmart
1899 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Walmart
3420 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Walmart
1327 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Walmart
729 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7977 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4448 views
1 comments
0 upvotes