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

Software Engineer

Walmart
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 Month
Topics: DSA, OOPS, OS, DBMS, Computer Networks,
Tip
Tip

Tip 1 : Be Strong with DSA
Tip 2 : Be Strong with OOPS and Core CS Fundamentals

Application process
Where: Other
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : One Page Resume
Tip 2 : Highlight your coding profiles

Interview rounds

01
Round
Hard
Online Coding Interview
Duration120 Minutes
Interview date3 Feb 2021
Coding problem2

Online Assessment

1. Reverse Nodes in k-Group

Hard
56m average time
30% success
0/120
Asked in companies
SAP LabsHikeAdobe

You are given a Singly Linked List of integers and an integer array 'B' of size 'N'. Each element in the array 'B' represents a block size. Modify the linked list by reversing the nodes in each block whose sizes are given by the array 'B'.

Note:
1. If you encounter a situation when 'B[i]' is greater than the number of remaining nodes in the list, then simply reverse the remaining nodes as a block and ignore all the block sizes from 'B[i]'. 

2. All block sizes are contiguous i.e. suppose that block 'B[i]' ends at a node cur, then the block 'B[i+1]' starts from the node just after the node cur.
Example
Linked list: 1->2->3->4->5
Array B: 3 3 5

Output: 3->2->1->5->4

We reverse the first block of size 3 and then move to block 2. Now, since the number of nodes remaining in the list (2) is less than the block size (3), we reverse the remaining nodes (4 and 5) as a block and ignore all the block sizes that follow.
Try solving now

2. Longest Valid Parentheses

Moderate
10m average time
90% success
0/80
Asked in companies
IntuitCIS - Cyber InfrastructureUber

You are given a string ‘S’ containing only the characters ‘)’ and ‘(‘. You need to find the length of the longest valid i.e. well-formed parentheses substring.

For example:
Let the given string be “(()())((”.

Here the valid parentheses substrings are: “()”, “()” and “(()())”. Out of these the longest valid string is “(()())” which has a length 6.
Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date1 Oct 2021
Coding problem1

DSA

1. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

Now let's just understand it with our given example,
Input: prices = [7,1,5,3,6,4]
Output: 5


Remember one rule :- You can only buy one time & sell one time

So, if buy at 7 & sell at any time in the future, we'll face loss. Because buying price is way higher then selling price available we have

Now, I have seen a dip & I buy at 1 & sell at 5 my overall profit will be 5 - 1 = 4

But what if, I had buy at 1 & sell at 6 my profit will be 6 - 1 = 5. Which is greater then my overall profit. So, i will update my overall profit with new value.

Now we have done as further we don't have any higher point to sell. We will return our answer.

Try solving now
03
Round
Easy
Video Call
Duration60 Minutes
Interview date5 Oct 2021
Coding problem1

Managerial Round

1. Level Order Traversal

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

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree

Example

The level order traversal will be {1,2,3,4,5,6,7}.
Problem approach

printLevelorder(tree)
1) Create an empty queue q
2) temp_node = root /*start from root*/
3) Loop while temp_node is not NULL
a) print temp_node->data.
b) Enqueue temp_node’s children 
(first left then right children) to q
c) Dequeue a node from q.

Try solving now

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
4 rounds | 7 problems
Interviewed by Walmart
1236 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Walmart
1326 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Walmart
728 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7976 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