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

SDE - 2

Walmart
upvote
share-icon
3 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Journey
Starting from a first semester in my college days, I was fond of competitive coding. I usually connected with seniors who were good in competitive coding, so that I can get more clarity and guidance regarding the field. I did competitive coding along with projects on web development.
Application story
Walmart - 3 Interview rounds. 1. Coding and MCQ round. 2 coding questions (based on tree and graph) and 20 MCQs (based on OOPS, DBMS, OS, DSA). 2. 3 interview rounds. 2 Technical + 1 Managerial . a) First Tech interview - Covered every theoretical concepts of OOPS, DBMS, OS, DSA and C++. b) Second Tech interview - Solved 7 coding questions based on Tree, Graph, linked list, Array and Stack. c) Managerial round - Based on project and previous experience work. 3. HR round - Discussion about the job role and company principles.
Why selected/rejected for the role?
Had good knowledge of the questions asked as I gave each answer in detail and with points. The coding questions I solved was most optimised and explained logically line by line.
Preparation
Duration: 4 months
Topics: Data Structures and Algorithms,OOPS,DBMS,Operating System,Java.
Tip
Tip

Tip 1 : Do atleast 2 projects based on real time implementation.
Tip 2 : Cover main topics of DSA and provide CP handles in resume.
Tip 3 : Make interactive resume with clickable links and handles, not more than 1 page.

Application process
Where: Campus
Eligibility: 7.5 CGPA, Good knowledge of DSA
Resume Tip
Resume tip

Tip 1 : Make interactive resume with clickable links and handles, not more than 1 page.
Tip 2 : Able to summarise the resume in 30 seconds.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration60 Minutes
Interview date20 Aug 2020
Coding problem2

Timing - It was evening 4 PM.
2 Coding questions based on Graphs.

1. Colour The Graph

Moderate
20m average time
80% success
0/80
Asked in companies
MeeshoChegg Inc.Microsoft

You are given a graph with 'N' vertices numbered from '1' to 'N' and 'M' edges. You have to colour this graph in two different colours, say blue and red such that no two vertices connected by an edge are of the same colour.

Note :
The given graph may have connected components.
Try solving now

2. Number Of Triangles In An Undirected Graph

Moderate
10m average time
90% success
0/80
Asked in companies
IBMGoldman Sachs

Given an undirected graph, find how many triangles it can have where a triangle is a cyclic path of length three which begins and end at the same vertex.

#### An undirected graph is a graph in which if you can go from a vertex, say, ‘A’ to ‘B,’ you can come back to ‘A’ from ‘B.’

For example:

In this graph, we can visit from vertex 1 to 2, then we can also visit from vertex 2 to 1. This is true for all vertices.
Try solving now
02
Round
Medium
Online Coding Test
Duration60 minutes
Interview date21 Aug 2020
Coding problem7

Timing - Morning 11 AM
Environment - Zoom
Interviewer was itself a competitive coder in his college days.

1. Bottom View Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
OYOMicrosoftAmazon

You are given a 'Binary Tree'.


Return the bottom view of the binary tree.


Note :
1. A node will be in the bottom-view if it is the bottom-most node at its horizontal distance from the root. 

2. The horizontal distance of the root from itself is 0. The horizontal distance of the right child of the root node is 1 and the horizontal distance of the left child of the root node is -1. 

3. The horizontal distance of node 'n' from root = horizontal distance of its parent from root + 1, if node 'n' is the right child of its parent.

4. The horizontal distance of node 'n' from root = horizontal distance of its parent from the root - 1, if node 'n' is the left child of its parent.

5. If more than one node is at the same horizontal distance and is the bottom-most node for that horizontal distance, including the one which is more towards the right.


Example:
Input: Consider the given Binary Tree:

alt text

Output: 4 2 6 3 7

Explanation:
Below is the bottom view of the binary tree.

alt text

1 is the root node, so its horizontal distance = 0.
Since 2 lies to the left of 0, its horizontal distance = 0-1= -1
3 lies to the right of 0, its horizontal distance = 0+1 = 1
Similarly, horizontal distance of 4 = Horizontal distance of 2 - 1= -1-1=-2
Horizontal distance of 5 = Horizontal distance of 2 + 1=  -1+1 = 0
Horizontal distance of 6 = 1-1 =0
Horizontal distance of 7 = 1+1 = 2

The bottom-most node at a horizontal distance of -2 is 4.
The bottom-most node at a horizontal distance of -1 is 2.
The bottom-most node at a horizontal distance of 0 is 5 and 6. However, 6 is more towards the right, so 6 is included.
The bottom-most node at a horizontal distance of 1 is 3.
The bottom-most node at a horizontal distance of 2 is 7.

Hence, the bottom view would be 4 2 6 3 7


Try solving now

2. Word Break

Moderate
15m average time
85% success
0/80
Asked in companies
Morgan StanleyMakeMyTripIBM

You are given a list of “N” strings A. Your task is to check whether you can form a given target string using a combination of one or more strings of A.

Note :
You can use any string of A multiple times.
Examples :
A =[“coding”, ”ninjas”, “is”, “awesome”]  target = “codingninjas”
Ans = true as we use “coding” and “ninjas” to form “codingninjas”
Try solving now

3. Frog Jump

Easy
30m average time
60% success
0/40
Asked in companies
MicrosoftDunzoCIS - Cyber Infrastructure

There is a frog on the '1st' step of an 'N' stairs long staircase. The frog wants to reach the 'Nth' stair. 'HEIGHT[i]' is the height of the '(i+1)th' stair.If Frog jumps from 'ith' to 'jth' stair, the energy lost in the jump is given by absolute value of ( HEIGHT[i-1] - HEIGHT[j-1] ). If the Frog is on 'ith' staircase, he can jump either to '(i+1)th' stair or to '(i+2)th' stair. Your task is to find the minimum total energy used by the frog to reach from '1st' stair to 'Nth' stair.

For Example
If the given ‘HEIGHT’ array is [10,20,30,10], the answer 20 as the frog can jump from 1st stair to 2nd stair (|20-10| = 10 energy lost) and then a jump from 2nd stair to last stair (|10-20| = 10 energy lost). So, the total energy lost is 20.
Try solving now

4. Detect And Remove Cycle

Easy
10m average time
90% success
0/40
Asked in companies
WalmartOracleGoldman Sachs

You have been given a Singly Linked List of integers, determine if it forms a cycle or not. If there is a cycle, remove the cycle and return the list.

A cycle occurs when a node's ‘next’ points back to a previous node in the list.

Try solving now

5. System Design Question

He asked me about what is map (general concept of map not language specific as in c++ or java). He then told me to design a data structure using the basic data structures such that searching in that can be done in O(1) in 95% cases and in 5% cases searching can take more than O(1) and the element to be searched can be an integer or a string.

6. Longest Consecutive Sequence

Moderate
40m average time
70% success
0/80
Asked in companies
WalmartOptumAmazon

You are given an unsorted array/list 'ARR' of 'N' integers. Your task is to return the length of the longest consecutive sequence.

The consecutive sequence is in the form ['NUM', 'NUM' + 1, 'NUM' + 2, ..., 'NUM' + L] where 'NUM' is the starting integer of the sequence and 'L' + 1 is the length of the sequence.

Note:

If there are any duplicates in the given array we will count only one of them in the consecutive sequence.
For example-
For the given 'ARR' [9,5,4,9,10,10,6].

Output = 3
The longest consecutive sequence is [4,5,6].
Follow Up:
Can you solve this in O(N) time and O(N) space complexity?
Try solving now

7. Basic HR Questions

It was a short round of nearly 10-15 minutes. The interviewer asked me to introduce myself. He then asked me why do I want to join Walmart. Why don’t I want to pursue higher studies, difference between job and career and what does I want, job or a career? He then asked me what do I want to achieve in the next 5 Years. He then asked a brief description about the project mentioned in my resume.

03
Round
Medium
HR Round
Duration30 minutes
Interview date22 Aug 2020
Coding problem1

Timing - Morning 11 AM
Environment - Zoom

1. Basic HR Questions

What did you work in previous organisation?

Why do you want join walmart?

Problem approach

Tip 1 : Always prepare the companies principles.
Tip 2 : Make a good research about the job role and company.

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
SDE - 2
3 rounds | 6 problems
Interviewed by Walmart
3112 views
1 comments
0 upvotes
company logo
SDE - 2
4 rounds | 4 problems
Interviewed by Walmart
2001 views
1 comments
0 upvotes
company logo
SDE - 2
4 rounds | 13 problems
Interviewed by Walmart
2127 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 7 problems
Interviewed by Walmart
1289 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6765 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5280 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Dunzo
3164 views
0 comments
0 upvotes