Upload Button Icon Add office photos

Walmart

Compare button icon Compare button icon Compare

Filter interviews by

Walmart SDE-2 Interview Questions, Process, and Tips

Updated 27 Dec 2021

Top Walmart SDE-2 Interview Questions and Answers

  • Q1. Maximum Frequency Number Problem Statement Given an array of integers with numbers in random order, write a program to find and return the number which appears the most ...read more
  • Q2. Sliding Window Maximum Problem Statement You are given an array/list of integers with length 'N'. A sliding window of size 'K' moves from the start to the end of the arr ...read more
  • Q3. Maximum Number With Single Swap You are given an array of N elements that represent the digits of a number. You can perform one swap operation to exchange the values at ...read more
View all 19 questions

Walmart SDE-2 Interview Experiences

3 interviews found

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 15 Sep 2021

I was interviewed in Jul 2021.

Round 1 - Coding Test 

(1 Question)

Round duration - 30 Minutes
Round difficulty - Easy

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.

  • Q1. 

    Maximum Depth of a Binary Tree Problem Statement

    Given the root node of a binary tree with N nodes, where each node contains integer values, determine the maximum depth of the tree. The depth is defined a...

  • Ans.  Recursive approach

    The idea is to use DFS (Depth First Search) traversal and recursively find the maximum depths of the left subtree and right subtree, returning the max of both the values plus 1 (counting the root node) as our answer.

     

    • We are given a function ‘findMaxDepth’ which takes the root node of the binary tree “ROOT”  as the parameter and returns an integer which is the maximum depth of the binary tre...
  • Answered Anonymously
Round 2 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Hard

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.

  • Q1. 

    Sliding Window Maximum Problem Statement

    You are given an array/list of integers with length 'N'. A sliding window of size 'K' moves from the start to the end of the array. For each of the 'N'-'K'+1 possi...

  • Ans. Brute Force

    Our intuition here is to go through each sliding window and keep track of the maximum element in each sliding window. To implement the same we run two nested loops, where the outer loop which will mark the starting point of the subarray of length k, the inner loop will run from the starting INDEX to INDEX + K, K elements from starting index and store the maximum element among these K elements into the answer...

  • Answered Anonymously
  • Q2. 

    String Transformation Problem

    Given a string (STR) of length N, you are tasked to create a new string through the following method:

    Select the smallest character from the first K characters of STR, remov...

  • Ans. Brute Force Approach
    • Create a new “answer” string that will contain the modified string
    • While the input string's length is greater than 0
      • Find the minimum character in the first K characters of the string (or the entire string if its length is less than K)
      • Append that character to the “answer” string
      • Remove that character from the input string
    • Return the “answer” string
    Space Complexity: O(1)Explanation:

    O(1)

     

    Since we ar...

  • Answered Anonymously
Round 3 - Video Call 

(2 Questions)

Round duration - 40 Minutes
Round difficulty - Medium

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.

  • Q1. 

    Maximum Number With Single Swap

    You are given an array of N elements that represent the digits of a number. You can perform one swap operation to exchange the values at any two indices. Your task is to de...

  • Ans. Brute Force

    The idea is to generate all the possible numbers by trying all the possible combinations of indices. We will run two nested loops to generate all numbers and inside the inner loop with we will have to compare the array, we get after swapping with the maximum number we get till this step.

    1. Let’s say we have a given array ARR.
    2. Let’s take an integer array of size N say MAX initialized to ARR, MAX[N] = ARR.
    3. Iterate ...
  • Answered Anonymously
  • Q2. 

    Equilibrium Index Problem Statement

    Given an array Arr consisting of N integers, your task is to find the equilibrium index of the array.

    An index is considered as an equilibrium index if the sum of elem...

  • Ans. Brute Force
    • We can try the brute force approach in which we consider every index starting from 0 as a possible candidate for equilibrium index, and to check if it is really an equilibrium index, we can calculate the sum of elements on both sides of that index, and check if they are equal or not. equal or not.
    • Let us initialise the ans = -1, which will contain our valid index.
    • Since index 0 and n - 1 cannot be possible can...
  • Answered Anonymously
Round 4 - Video Call 

(1 Question)

Round duration - 30 Minutes
Round difficulty - Easy

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

  • Q1. 

    Maximum Frequency Number Problem Statement

    Given an array of integers with numbers in random order, write a program to find and return the number which appears the most frequently in the array.

    If multip...

  • Ans. Brute Force Approach

    Here, we can simply run two loops. The outer loop picks all elements one by one and the inner loop finds the frequency of the picked element and compares it with the maximum present so far.

     

    Algorithm:

     

    • Declare 4 variables as ‘maxFrequency’ , ‘currentFrequency’ , ‘maxElement’ , ‘currentElement’ and initialize them with 0
    • Run a loop from ‘i’ = ‘0’ to ‘N’
      • Set ‘currentElement’ as arr[i] and ‘curr...
  • Answered Anonymously
Round 5 - HR 

Round duration - 30 Minutes
Round difficulty - Easy

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.

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from J.C. Bose University of Science and Technology, YMCA. I applied for the job as SDE - 2 in BangaloreEligibility criteria7 CGPAWalmart interview preparation:Topics to prepare for the interview - Data structures, Algorithms, OOPS, OS, DBMS, Computer NetworksTime required to prepare for the interview - 3 MonthsInterview preparation tips for other job seekers

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 resume tips for other job seekers

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.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 21 Dec 2021

I was interviewed in Sep 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

Standard Data Structures and Algorithms round . One has to be fairly comfortable in solving algorithmic problems to pass this round with ease.

  • Q1. 

    Pair Sum Problem Statement

    You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

    Note:
    ...
  • Q2. 

    Convert Sorted Array to BST Problem Statement

    Given a sorted array of length N, your task is to construct a balanced binary search tree (BST) from the array. If multiple balanced BSTs are possible, you ca...

Round 2 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

Again a DSA specific round , where I was given two problems to solve ranging from Medium to Hard. Major topics discussed were Binary Trees and Dynamic Programming.

  • Q1. 

    Top View of a Binary Tree Problem Statement

    You are given a Binary Tree of integers. Your task is to determine and return the top view of this binary tree.

    The top view of a binary tree consists of all th...

  • Q2. 

    Minimum Jumps Problem Statement

    Bob and his wife are in the famous 'Arcade' mall in the city of Berland. This mall has a unique way of moving between shops using trampolines. Each shop is laid out in a st...

Round 3 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round majorly focused on past projects and experiences from my Resume and some standard System Design + LLD questions + some basic OS questions which a SDE-2 is expected to know .

  • Q1. Design a URL shortener.
  • Q2. How can you print numbers from 1 to 100 using more than two threads in an optimized approach?

Interview Preparation Tips

Eligibility criteriaAbove 2 years of experienceWalmart interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, DBMS, OOPSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions Asked at Other Companies

asked in Walmart
Q1. Maximum Frequency Number Problem Statement Given an array of inte ... read more
asked in Atlassian
Q2. K Most Frequent Words Problem Statement Given an array of N non-e ... read more
Q3. Reverse String Operations Problem Statement You are provided with ... read more
asked in ShareChat
Q4. Square Root of an Integer Challenge Given an integer 'A', the obj ... read more
asked in DP World
Q5. Count Ways To Reach The N-th Stair Problem Statement You are give ... read more

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 27 Dec 2021

I was interviewed in Mar 2021.

Round 1 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

Standard Data Structures and Algorithms round . One has to be fairly comfortable in solving algorithmic problems to pass this round with ease.

  • Q1. 

    Minimum Cost to Connect Sticks

    You are provided with an array, ARR, of N positive integers. Each integer represents the length of a stick. The task is to connect all sticks into one by paying a cost to jo...

  • Ans. 

    It is a greedy approach where we will form a min-heap of all the lengths of sticks that are given to us. In this approach, we will always find two sticks with minimum length and connect them and add their cost to our answer. Also, we will add the newly formed stick back into our min-heap. And then we will continue to do the same procedure for all the remaining sticks. Since we need to minimize the cost to connect all t...

  • Answered Anonymously
  • Q2. 

    Minimum Jumps Problem Statement

    Bob and his wife are in the famous 'Arcade' mall in the city of Berland. This mall has a unique way of moving between shops using trampolines. Each shop is laid out in a st...

  • Ans. 

    Approach 1 : Naive Recursive Approach

    A naive approach is to start from the first element and recursively call for all the elements reachable from first
    element. The minimum number of jumps to reach end from first can be calculated using minimum number of jumps
    needed to reach end from the elements reachable from first.
    minJumps(start, end) = Min ( minJumps(k, end) ) for all k reachable from start

    TC : O(n^n)
    SC:O(n)


    Approach...

  • Answered Anonymously
Round 2 - Video Call 

(4 Questions)

Round duration - 70 Minutes
Round difficulty - Hard

This round was preety intense and went for over 1 hour . I was asked 2 preety good coding questions (one was from Graphs and the other one was from DP) . After that I was grilled on my Computer Networks concepts but luckily I was able to answer all the questions and the interviewer was also quite impressed .

  • Q1. 

    Bipartite Graph Problem Statement

    Determine if a given graph is bipartite. A graph is bipartite if its vertices can be divided into two independent sets, 'U' and 'V', such that every edge ('u', 'v') conne...

  • Ans. 

    Algorithm : 
    1) Create a graph such that there is a edge between each pair of enemies.
    2) We need to find that the above graph is bipartite or not. Check whether the graph is 2-colorable or not
    3) We can do that by running dfs and using an auxilary array col to store the assigned col of the node.
    4) If we can color the graph with two color such that no two enemies have same color then only we can create two teams.

    TC :...

  • Answered Anonymously
  • Q2. 

    Maximum Length Pair Chain Problem Statement

    You are provided with 'N' pairs of integers such that in any given pair (a, b), the first number is always smaller than the second number, i.e., a < b. A pai...

  • Ans. 

    Approach 1 (Using DP ) :

    Observe that , If a chain of length k ends at some pairs[i], and pairs[i][1] < pairs[j][0], we can extend this chain to a chain of length k+1

    Steps :
    1) Sort the pairs by first coordinate, and let dp[i] be the length of the longest chain ending at pairs[i]. 
    2) When i < j and pairs[i][1] < pairs[j][0], we can extend the chain, and so we have the candidate answer 
    dp[j] = max(dp[j]...

  • Answered Anonymously
  • Q3. Can you explain the TCP/IP protocol?
  • Ans. 

    1) TCP or TCP/IP is the Transmission Control Protocol/Internet Protocol. 
    2) It is a set of rules that decides how a computer connects to the Internet and how to transmit the data over the network. 
    3) It creates a virtual network when more than one computer is connected to the network and uses the three ways handshake model to establish the connection which makes it more reliable.

  • Answered Anonymously
  • Q4. Can you explain the DHCP Protocol?
  • Ans. 

    1) DHCP is the Dynamic Host Configuration Protocol.
    2) It is an application layer protocol used to auto-configure devices on IP networks enabling them to use the TCP and UDP-based protocols.
    3) The DHCP servers auto-assign the IPs and other network configurations to the devices individually which enables them to communicate over the IP network. 
    4) It helps to get the subnet mask, IP address and helps to resolve the

  • Answered Anonymously
Round 3 - Video Call 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round majorly focused on past projects and experiences from my Resume and some standard System Design +
LLD questions + some basic OS questions which a SDE-2 is expected to know .

  • Q1. How would you design a system like Pastebin?
  • Ans. 

    Approach : 

    Pastebin allows users to store text-based data over the internet for a set period of time and generate a unique URL corresponding uploaded data to share that with anyone. Users who create that data, can also modify it by logging in to the same account. 

    Database Schema :

    i) users(userID, name, createdAT, metaData)
    ii) paste(pasteID, content, URL, createdAt, expiryAt)

    Algorithm :

    1) create_paste(api_key,...

  • Answered Anonymously
  • Q2. What is data abstraction and how can it be achieved?
  • Ans. 

    Answer : 
    1) Data abstraction is a very important feature of OOPs that allows displaying only the important information and hiding the implementation details. 
    2) For example, while riding a bike, you know that if you raise the accelerator, the speed will increase, but you don’t know how it actually happens. 
    3) This is data abstraction as the implementation details are hidden from the rider.

    Data abstractio...

  • Answered Anonymously

Interview Preparation Tips

Eligibility criteriaAbove 2 years of experienceWalmart interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects/experiences explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview questions from similar companies

Round 1 - Coding Test 
Round 2 - One-on-one 

(1 Question)

  • Q1. They asked me about my projects and some ezz dsa questions
Round 3 - One-on-one 

(1 Question)

  • Q1. This round was totally based on my projects and some dsa

Interview Preparation Tips

Interview preparation tips for other job seekers - Get your basics cleared ex - if you work on js you should know that in depth

Tell us how to improve this page.

Interview Questions from Similar Companies

Accenture Interview Questions
3.8
 • 8.2k Interviews
Amazon Interview Questions
4.1
 • 5k Interviews
IBM Interview Questions
4.0
 • 2.4k Interviews
Reliance Retail Interview Questions
3.9
 • 1.5k Interviews
Flipkart Interview Questions
4.0
 • 1.4k Interviews
Oracle Interview Questions
3.7
 • 897 Interviews
Google Interview Questions
4.4
 • 871 Interviews
DMart Interview Questions
3.9
 • 397 Interviews
Cisco Interview Questions
4.1
 • 396 Interviews
View all
Walmart SDE-2 Salary
based on 55 salaries
₹14 L/yr - ₹29.3 L/yr
31% less than the average SDE-2 Salary in India
View more details

Walmart SDE-2 Reviews and Ratings

based on 5 reviews

4.5/5

Rating in categories

3.9

Skill development

4.1

Work-life balance

3.7

Salary

4.7

Job security

4.4

Company culture

3.8

Promotions

4.1

Work satisfaction

Explore 5 Reviews and Ratings
Software Engineer III
1.8k salaries
unlock blur

₹18 L/yr - ₹47 L/yr

Senior Software Engineer
1.3k salaries
unlock blur

₹23 L/yr - ₹80 L/yr

Software Engineer
723 salaries
unlock blur

₹12 L/yr - ₹45 L/yr

Software Development Engineer 3
256 salaries
unlock blur

₹15.6 L/yr - ₹46 L/yr

Assistant Team Leader
231 salaries
unlock blur

₹1.5 L/yr - ₹5 L/yr

Explore more salaries
Compare Walmart with

Amazon

4.1
Compare

Flipkart

4.0
Compare

Microsoft Corporation

4.0
Compare

Google

4.4
Compare
Did you find this page helpful?
Yes No
write
Share an Interview