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

SDE - 2

Walmart
upvote
share-icon
5 rounds | 12 Coding problems

Interview preparation journey

expand-icon
Journey
My journey started in my college when I first learned to code. Then onwards, I have practised alot from Leetcode and Code studio. Later on, I also tried competitive programming as well. Along with DSA, I made sure that I maintain a good CGPA. After working for almost 3 years in my first company, I was looking for a job switch after getting promoted.
Application story
I saw a post of HR person on LinkedIn and requested them to consider. After almost seven days of applying, I received a mail from the HR that I am shortlisted to sit for further interview rounds.
Why selected/rejected for the role?
I was selected because of my strong knowledge of core fundamentals and DSA. I gave optimised approaches for almost all the coding questions that I was asked and did a dry-run as well. Confidence is the main key to selection in interviews.
Preparation
Duration: 3 Months
Topics: Data structures, Algorithms, OOPS, OS, DBMS, Computer Networks
Tip
Tip

Tip 1 : Make sure you have your computer science fundamentals very clear.
Tip 2 : Should know the complexity of code you write and should know the internal implementation of data structure you use while coding.
Tip 3 : Should know about everything you write in resume.
Tip 4: Practice a lot of programming problems. Participate in competitive programming contests.

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

Tip 1 : Be honest about what you write in resume.
Tip 2 : Should have at least 2 projects
Tip 3 : Maintain a precise and self speaking one page resume.
Tip 4 : Add technical achievements only.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration30 Minutes
Interview date12 Jun 2021
Coding problem2

MCQ Challenge was to test basic computer fundamentals. The quiz had 30 questions to be attempted in 25 minutes consisting questions related to Data structures and algorithm, OOPS, OS, DBMS and some questions to find the output of Java Program.
Platform was fast and responsive, and we were not allowed to switch through tabs during the test.

1. Technical Questions

What is a basic form of GRANT statement?

Calculate the result of the following prefix expression: +,-,*,8,4,/,6,2,5

If a new node is added into a red-black tree, which statements are true ?

What is the complexity of enqueue and dequeue operation in a queue?

2. Maximum Depth Of A Binary Tree

Easy
15m average time
85% success
0/40
Asked in companies
FacebookTata Consultancy Services (TCS)Walmart

You are given the root node of a binary tree with N nodes, whose nodes have integer values. Your task is to find the maximum depth of the given Binary tree.

Depth of a binary tree is the same as its height. In simpler terms, you have to find the total number of nodes encountered while moving from the root node to the farthest leaf node, along the longest path of the binary tree.

Example:-

example

If we are given the above binary tree as input then moving from root node(5) to the farthest leaf node(50), the path formed will be [ 5->10->25->35->40->45->50 ]. The total number of nodes encountered is 7, therefore the maximum depth of the binary tree is 7.
Try solving now
02
Round
Hard
Online Coding Test
Duration90 minutes
Interview date13 Jun 2021
Coding problem2

90 minutes is what we get to present a logical coding solution to the challenge presented to us. There were 2 coding questions and we can submit the answer as many times we want. There were hidden test cases and after submitting we could only see the score.

1. Maximum In Sliding Windows Of Size K

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

Given an array/list of integers of length ‘N’, there is a sliding window of size ‘K’ which moves from the beginning of the array, to the very end. You can only see the ‘K’ numbers in a particular window at a time. For each of the 'N'-'K'+1 different windows thus formed, you are supposed to return the maximum element in each of them, from the given array/list.

Try solving now

2. String Transformation

Moderate
23m average time
0/80
Asked in companies
WalmartSprinklrAccenture

Given a string (STR) of length N, you have to create a new string by performing the following operation:

Take the smallest character from the first 'K' characters of STR, remove it from STR and append it to the new string.

You have to perform this operation until STR is empty.

 Note:
The input string(STR) will not contain any spaces.

Assume that all characters in STR are lower case letters.

If characters less than 'K' remain, then append them in a sorted way to the new string.
Example:
Let the input string be "edcba" with K = 4.

Let the new string to be formed is initially empty, newString = "".
The first set of 4 characters are, ('e', 'd', 'c', 'b')
Out of these 4 characters, the smallest one is 'b' and hence we add it to the newString and it becomes, 
newString = "b"

The next set of 4 characters are, ('e', 'd', 'c', 'a')
Out of these 4 characters, the smallest one is 'a' and hence we add it to the newString and it becomes, 
newString = "ba"

Now we are left with "edc" and since we can't get a window of size 4, we sort them in the increasing order and append them to the newString.

Hence, newString thus formed will be "bacde".
Try solving now
03
Round
Medium
Video Call
Duration40 Minutes
Interview date16 Jul 2021
Coding problem3

It was the first technical round conducted on Zoom held for about 40 min. The video was enabled for this round. Computer fundamentals and problem solving was checked in this round.

1. Maximum Number

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

You are given an array of N elements. This array represents the digits of a number. In an operation, you can swap the value at any two indices. Your task is to find the maximum number by using operation at most once.

For Example :

Input array [1,3,2,7] so basically this array represents the number 1327.
All the possible combinations are :
1. [3 1 2 7] get by swapping indices 1 and 2.
2. [2 3 1 7] get by swapping indices 1 and 3.
3. [7 3 2 1] get by swapping indices 1 and 4.
4. [1 2 3 7] get by swapping indices  2 and 3.
5. [1 7 2 3] get by swapping indices 2 and 4.
6. [1 3 7 2] get by swapping indices 3 and 4.
Out of all the possible combinations, 3 give the maximum number as 7321, so we will return [7 3 2 1].

Note :

The input may have 0 before the most significant digit. e.g. [0,3,5,7] is a valid input and this represents number 357.
Try solving now

2. Technical Questions

Exception handling in C++ in detail.

What do mean by OOPS.

What is inheritance.

Create a database to store the information of employees and their salaries (just explain)

What are insertion, deletion and updating anomalies in DBMS.

What's polymorphism ?

Write code to show run time polymorphism.

3. Equilibrium Index

Easy
0/40
Asked in companies
GoogleWalmartAdobe

You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.

An index is considered as an equilibrium index if the sum of elements of the array to the left of that index is equal to the sum of elements to the right of it.

Note:

1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Try solving now
04
Round
Easy
Video Call
Duration30 Minutes
Interview date16 Jul 2021
Coding problem3

It was the first technical round conducted on Zoom held for about 40 min. The video was enabled for this round.

1. Technical Questions

1. Whats polymorphism - compile time and run time.
2. What are exceptions in Java - Since my primary language was C++, I explained exception in C++ only.
3. What are collections in Java- list, map, set

4. Whats binary search - only explain with dry run on an example.
5. Name all the sorting algorithm you have studied and which algorithm to be used for larger inputs.

2. SQL Question

Write a SQL query to print the highest salary of each department in a employee table that contains employee details - department to which employee belong, salary of employee.

3. Maximum Frequency Number

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Qualcomm

Ninja is given an array of integers that contain numbers in random order. He needs to write a program to find and return the number which occurs the maximum times in the given input. He needs your help to solve this problem.

If two or more elements contend for the maximum frequency, return the element which occurs in the array first i.e. whose index is lowest.

For example,

For 'arr' = [ 1, 2, 3, 1, 2]. you need to return 1.
Try solving now
05
Round
Easy
HR Round
Duration30 Minutes
Interview date16 Jul 2021
Coding problem2

This was the final round held for about 30 min on Zoom. My video was enabled all the time and basic HR questions were being asked.

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

2. Puzzle

You are trying to cook an egg for exactly fifteen minutes, but instead of a timer, you are given two ropes which burn for exactly 1 hour each. The ropes, however, are of uneven densities – i e , half the rope length-wise might take only two minutes to burn. How can you cook the egg for exactly fifteen minutes?

Here's your problem of the day

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

Skill covered: Programming

Which operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
3 rounds | 6 problems
Interviewed by Walmart
2219 views
1 comments
0 upvotes
company logo
SDE - 2
4 rounds | 4 problems
Interviewed by Walmart
1405 views
1 comments
0 upvotes
company logo
SDE - 2
4 rounds | 13 problems
Interviewed by Walmart
1603 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 7 problems
Interviewed by Walmart
933 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
5423 views
0 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
3908 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Dunzo
2568 views
0 comments
0 upvotes