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

SDE - Intern

Walmart
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, OOPS, Operating System, DBMS, Dynamic Programming, Algorithms, Memory Allocation, System Design
Tip
Tip

Tip 1 : Be consistent, practice at least 10 questions everyday if you have 4-5 months
Tip 2 : Practice important company archives and see interview experiences of others
Tip 3 : Notice the time complexity of your proposed solution

Application process
Where: Campus
Eligibility: Above 7 CGPA without any active backlogs
Resume Tip
Resume tip

Tip 1 : Mention projects and internships in chronological order
Tip 2 : Add facts and numbers related to the impact your projects have created
Tip 3 : Do not enter false details

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date20 Aug 2020
Coding problem1

The test had one coding question of 60 marks and rest were MCQs on OS, OOPS, DBMS concepts. The MCQs did not have negative marking. 

The test was in the evening and passing all the test cases of the question was necessary to move to the next round. The question could also be solved using brute force approach. The test was proctored and was conducted on Hackerrank.

1. Next Smaller Element

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

You are given an array 'ARR' of integers of length N. Your task is to find the next smaller element for each of the array elements.

Next Smaller Element for an array element is the first element to the right of that element which has a value strictly smaller than that element.

If for any array element the next smaller element does not exist, you should print -1 for that array element.

For Example:

If the given array is [ 2, 3, 1], we need to return [1, 1, -1]. Because for  2, 1 is the Next Smaller element. For 3, 1 is the Next Smaller element and for 1, there is no next smaller element hence the answer for this element is -1.
Problem approach

I used stack to solve this problem. Here we maintain items in increasing order in the stack (instead of decreasing in next greater element problem).

Push the first element to stack.
Pick rest of the elements one by one and follow following steps in loop.
Mark the current element as next.
If stack is not empty, then compare next with stack top. If next is smaller than top then next is the NSE for the top. Keep popping from the stack while top is greater than next. next becomes the NSE for all such popped elements
Push next into the stack
After the loop in step 2 is over, pop all the elements from stack and print -1 as next element for them.

Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date20 Aug 2020
Coding problem2

The round was 1 hour long. It was conducted in the afternoon. The interviewer was an SDE3 working at Walmart. The interview was conducted on zoom and I was asked to share my screen and turn on my camera. I used eclipse IDE to solve the question and I was also asked to run it for some test cases.

1. Technical Question

Arrange the following time complexities from high to low: n^2, n^n, logn, nlogn, n

Problem approach

Tip 1 : Analyse the complexity of every question that you solve
Tip 2 : Practice questions on time complexity
Tip 3 : Read DSA book Cormen thoroughly.

2. Josephus

Moderate
30m average time
70% success
0/80
Asked in companies
IntuitCultfitAmazon

‘N’ people are standing in a circle numbered from ‘1’ to ‘N’ in clockwise order. First, the person numbered 1 will proceed in a clockwise direction and will skip K-1 persons including itself and will kill a Kth person. Now (K+1)th person from 1 will start and will kill the Kth person from itself.

You have to find the position of the last person surviving with respect to initial numbering.

Note:
A person can also kill himself.
Problem approach

I used lists and recursion to solve the problem.

I created a list and add all values from 1 to n in it. Create a recursive function that takes list, start (position at which counting will start) and k ( number of person to be skipped) as argument. If size of list is one i.e. only one person left then return this position. Otherwise, start counting k person in clockwise direction from starting position and remove the person at kth position. Now the person at kth position is removed and now counting will start from this position. This process continues till only one person left.

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
SDE - Intern
2 rounds | 4 problems
Interviewed by Walmart
1950 views
0 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 4 problems
Interviewed by Walmart
2991 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Walmart
1866 views
1 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 6 problems
Interviewed by Walmart
1671 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes