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. 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 ...read more
  • Q3. 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
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. 

    Find the maximum depth of a binary tree given its level order traversal.

    • Traverse the tree level by level and keep track of the depth using a queue data structure.

    • For each level, increment the depth by 1 until all nodes are processed.

    • Return the maximum depth encountered during traversal as the final result.

    • Example: For input [5, 10, 15, 20, -1, 25, 30, -1, 40, -1, -1, -1, -1, 45], the maximum depth is 7.

  • Answered by AI
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. 

    Sliding window maximum problem where we find maximum element in each window of size K.

    • Use a deque to store indices of elements in decreasing order within the window.

    • Pop elements from the deque that are out of the current window.

    • Add the maximum element to the result for each window.

  • Answered by AI
  • 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. 

    Given a string, select smallest character from first K characters, remove it, and append to new string until original string is empty.

    • Iterate through the string, selecting the smallest character from the first K characters each time.

    • Remove the selected character from the original string and append it to the new string.

    • Repeat the process until the original string is empty.

    • Return the final new string formed after the ope

  • Answered by AI
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. 

    Given an array of digits, find the maximum number that can be achieved by performing at most one swap.

    • Iterate through the array to find the maximum digit.

    • If the maximum digit is already at the beginning, find the next maximum digit and swap them.

    • If the maximum digit is not at the beginning, swap it with the digit at the beginning.

  • Answered by AI
  • 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. 

    Find the equilibrium index of an array where sum of elements on left equals sum on right.

    • Iterate through the array and calculate prefix sum and suffix sum at each index.

    • Compare prefix sum and suffix sum to find equilibrium index.

    • Return the left-most equilibrium index found.

  • Answered by AI
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. 

    Find the number with the maximum frequency in an array of integers.

    • Create a hashmap to store the frequency of each element in the array.

    • Iterate through the array to update the frequency count.

    • Find the element with the maximum frequency and return it.

    • If multiple elements have the same maximum frequency, return the one with the lowest index.

  • Answered by AI
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:
    ...
  • Ans. 

    Find pairs of elements in an array that sum up to a given value, sorted in a specific order.

    • Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.

    • If the complement exists, add the pair to the result list.

    • Sort the result list based on the criteria mentioned in the question.

    • Return the sorted list of pairs.

  • Answered by AI
  • 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...

  • Ans. 

    Construct a balanced binary search tree from a sorted array.

    • Create a recursive function to construct the BST by selecting the middle element as the root.

    • Recursively construct the left subtree with elements to the left of the middle element and the right subtree with elements to the right.

    • Ensure that the constructed tree is balanced by maintaining the height difference of left and right subtrees at most 1.

  • Answered by AI
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...

  • Ans. 

    The task is to determine and return the top view of a given Binary Tree of integers.

    • The top view of a binary tree consists of all the nodes visible when the tree is viewed from the top.

    • Identify the nodes that appear on the top when looking from above the tree.

    • Output the top view as a space-separated list of node values from left to right.

  • Answered by AI
  • 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. 

    Find the minimum number of jumps Bob needs to make from shop 0 to reach the final shop, or return -1 if impossible.

    • Use a greedy approach to keep track of the farthest reachable shop from the current shop.

    • If at any point the current shop is not reachable, return -1.

    • Update the current farthest reachable shop as you iterate through the array.

  • Answered by AI
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.
  • Ans. 

    Design a URL shortener system to generate short URLs for long URLs.

    • Use a unique identifier for each long URL to generate a short URL.

    • Store the mapping of short URL to long URL in a database.

    • Implement a redirection mechanism to redirect short URLs to their corresponding long URLs.

  • Answered by AI
  • Q2. How can you print numbers from 1 to 100 using more than two threads in an optimized approach?
  • Ans. 

    Use multiple threads to print numbers from 1 to 100 in an optimized approach.

    • Divide the range of numbers (1-100) among the threads to avoid overlap.

    • Use synchronization mechanisms like mutex or semaphore to ensure proper order of printing.

    • Implement a logic where each thread prints its assigned numbers in sequence.

    • Consider using a thread pool to manage and optimize thread creation and execution.

    • Example: Thread 1 prints n...

  • Answered by AI

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 KhataBook
Q4. Alien Dictionary Problem Statement Ninja is mastering an unusual ... read more
asked in Zoho
Q5. Make Palindrome Problem Statement You are provided with a string ... 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. 

    Find the minimum cost to connect all sticks into one by joining two sticks at a time.

    • Sort the array of stick lengths in non-decreasing order.

    • Keep adding the two smallest sticks at a time to minimize cost.

    • Repeat until all sticks are connected into one.

  • Answered by AI
  • 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. 

    Find the minimum number of jumps Bob needs to make from shop 0 to reach the final shop, or return -1 if impossible.

    • Use BFS to traverse through the shops and keep track of the minimum jumps needed to reach each shop.

    • If at any point the current shop has Arr[i] = 0, return -1 as it is impossible to reach the final shop.

    • Return the minimum number of jumps needed to reach the last shop.

    • Example: For the input [5, 3, 2, 1, 0, ...

  • Answered by AI
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. 

    Check if a given graph is bipartite by dividing its vertices into two independent sets.

    • Create two sets 'U' and 'V' to store vertices based on their connections

    • Use BFS or DFS to traverse the graph and assign vertices to sets

    • Check if any edge connects vertices within the same set, if yes, the graph is not bipartite

  • Answered by AI
  • 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. 

    Given pairs of integers, find the length of the longest pair chain where each pair follows the given condition.

    • Sort the pairs based on the second element in ascending order.

    • Iterate through the sorted pairs and keep track of the maximum chain length.

    • Update the chain length if the current pair can be added to the chain.

    • Return the maximum chain length as the result.

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

    TCP/IP is a set of protocols that governs the transmission of data over the internet.

    • TCP/IP stands for Transmission Control Protocol/Internet Protocol.

    • It is a suite of communication protocols used to interconnect network devices on the internet.

    • TCP ensures that data packets are delivered reliably and in order.

    • IP is responsible for addressing and routing packets to their destination.

    • Examples of TCP/IP applications inclu...

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

    DHCP is a network protocol that automatically assigns IP addresses to devices on a network.

    • DHCP stands for Dynamic Host Configuration Protocol

    • It allows devices to obtain IP addresses and other network configuration information dynamically

    • DHCP servers assign IP addresses to devices within a network

    • DHCP uses a lease mechanism to control the amount of time a device can use an IP address

    • DHCP reduces the administrative burd

  • Answered by AI
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. 

    A system like Pastebin allows users to store and share text snippets online.

    • Allow users to paste text content into a form

    • Generate a unique URL for each paste

    • Set expiration time for pastes to be automatically deleted

    • Implement syntax highlighting for various programming languages

    • Provide options for users to set visibility (public/private) of their pastes

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

    Data abstraction is the process of hiding implementation details and showing only the necessary features of an object.

    • Data abstraction can be achieved through abstract classes and interfaces in object-oriented programming.

    • It helps in reducing complexity by providing a simplified view of the data.

    • By using access specifiers like private, protected, and public, we can control the visibility of data members and methods.

    • Exa...

  • Answered by AI

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

I was interviewed before May 2021.

Round 1 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    Rearrange String Problem Statement

    Given a string ‘S’, your task is to rearrange its characters so that no two adjacent characters are the same. If it's possible, return any such arrangement, otherwise re...

  • Ans. 

    Given a string, rearrange its characters so that no two adjacent characters are the same.

    • Iterate through the string and count the frequency of each character.

    • Use a priority queue to rearrange the characters based on their frequency.

    • Check if it's possible to rearrange the string without any two adjacent characters being the same.

    • Return 'Yes' if possible, 'No' otherwise.

  • Answered by AI
  • Q2. 

    Find Nodes at Distance K in a Binary Tree

    Your task is to find all nodes that are exactly a distance K from a given node in an arbitrary binary tree. The distance is defined as the number of edges between ...

  • Ans. 

    Find all nodes at distance K from a given node in a binary tree.

    • Perform a depth-first search starting from the target node to find nodes at distance K.

    • Use a recursive function to traverse the tree and keep track of the distance from the target node.

    • Maintain a set to store visited nodes to avoid revisiting them.

    • Return the list of nodes found at distance K from the target node.

    • Example: If the target node is 5 and K is 2 ...

  • Answered by AI
Round 2 - Video Call 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    My Calendar Problem Statement

    Given N events, each represented with a start and end time as intervals, i.e., booking on the half-open interval [start, end). Initially, the calendar is empty. A new event c...

  • Ans. 

    Given N events with start and end times, determine if each event can be added to the calendar without causing a triple booking.

    • Iterate through each event and check if adding it causes a triple booking by comparing its interval with previous events

    • Use a data structure like a list or dictionary to keep track of booked intervals

    • Return 'True' if the event can be added without causing a triple booking, 'False' otherwise

  • Answered by AI
Round 3 - Video Call 

Round duration - 45 minutes
Round difficulty - Easy

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in HyderabadEligibility criteriaNo criteriaMicrosoft interview preparation:Topics to prepare for the interview - Algorithms, System Design, Fundamentals, Problem Solving, BehavioralTime required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Tip 1 : Focus on fundamentals
Tip 2 : Focus on problem solving skills
Tip 3 : Be consistent

Application resume tips for other job seekers

Tip 1 : Do not bloat your resume with non-sense, add only what you have done and only major projects.
Tip 2 : Be crisp - adding 10 programming languages in your resume won't take you anywhere but understanding 1 language with heart is definitely a major plus.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed before May 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Easy

  • Q1. 

    Next Greater Element Problem Statement

    Given a list of integers of size N, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X is the firs...

  • Ans. 

    Find the Next Greater Element for each element in a list of integers.

    • Iterate through the list of integers from right to left.

    • Use a stack to keep track of elements for which the Next Greater Element is not yet found.

    • Pop elements from the stack until a greater element is found or the stack is empty.

    • Assign the Next Greater Element as the top element of the stack or -1 if the stack is empty.

  • Answered by AI
  • Q2. 

    Clone Linked List with Random Pointer

    Your task is to create a deep copy of a linked list, where each node has two pointers: one that points to the next node in the list, and a 'random' pointer which can ...

  • Ans. 

    Create a deep copy of a linked list with random pointers.

    • Iterate through the original linked list and create a new node for each node in the list.

    • Store the mapping of original nodes to their corresponding new nodes.

    • Update the next and random pointers of the new nodes based on the mapping.

    • Return the head of the newly created deep copied linked list.

  • Answered by AI
Round 2 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    Smallest Window Problem Statement

    Given two strings S and X containing random characters, the task is to find the smallest substring in S which contains all the characters present in X.

    Input:

    The first...
  • Ans. 

    The task is to find the smallest substring in string S which contains all the characters present in string X.

    • Iterate through string S and keep track of characters in X using a hashmap

    • Use two pointers to maintain a sliding window with all characters from X

    • Update the window size and start index when a valid window is found

  • Answered by AI
  • Q2. 

    Connect Nodes at Same Level Problem Statement

    Given a binary tree, connect all adjacent nodes at the same level by populating each node's 'next' pointer to point to its next right node. If there is no nex...

  • Ans. 

    Connect adjacent nodes at the same level in a binary tree by populating each node's 'next' pointer.

    • Traverse the tree level by level using a queue.

    • For each node, connect it to the next node in the queue.

    • Set the 'next' pointer of the last node in each level to NULL.

    • Use constant extra space and do not alter the node structure.

  • Answered by AI
Round 3 - Face to Face 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Easy

  • Q1. 

    Closest Palindrome Problem Statement

    You are given a string 'S' that represents a number. Your task is to find the closest palindromic number to this integer represented by 'S'. The closest number is defi...

  • Ans. 

    Find the closest palindromic number to a given integer represented by a string.

    • Convert the string to an integer and iterate to find the closest palindromic number.

    • Check for palindromic numbers by reversing the digits and comparing with the original number.

    • Handle cases where multiple closest palindromic numbers exist by choosing the smaller one.

  • Answered by AI
Round 4 - Face to Face 

(3 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

  • Q1. 

    Minimum Operation Needed to Convert to the Given String

    You are given two strings str1 and str2. Determine the minimum number of operations required to transform str1 into str2.

    Explanation:

    An operatio...

  • Ans. 

    Determine the minimum number of operations needed to transform one string into another by moving characters to the end.

    • Iterate through each character in str1 and check if it matches the first character in str2. If it does, calculate the number of operations needed to move it to the end.

    • If no match is found for the first character in str2, return -1 as transformation is not possible.

    • Repeat the process for each test case...

  • Answered by AI
  • Q2. 

    Snake and Ladder Problem Statement

    Given a Snake and Ladder Board with 'N' rows and 'N' columns filled with numbers from 1 to N*N starting from the bottom left of the board, and alternating direction each...

  • Ans. 

    Find the minimum number of dice throws required to reach the last cell on a Snake and Ladder board.

    • Use Breadth First Search (BFS) to explore all possible paths with minimum dice throws.

    • Keep track of visited cells and the number of dice throws needed to reach each cell.

    • Consider the effect of snakes and ladders on the next position.

    • Return the minimum number of dice throws needed to reach the last cell.

    • If it is impossible

  • Answered by AI
  • Q3. Can you provide a high-level design of a web crawler?
  • Ans. 

    A web crawler is a program that systematically browses the internet to index and collect information from websites.

    • Start by identifying the target websites to crawl

    • Implement a queue to manage the URLs to be crawled

    • Use a crawler algorithm to visit and extract data from web pages

    • Implement a mechanism to handle duplicate URLs and avoid infinite loops

    • Consider implementing a robots.txt parser to respect website crawling rul

  • Answered by AI
Round 5 - Face to Face 

(1 Question)

Round duration - 70 Minutes
Round difficulty - Medium

  • Q1. Design a system that can efficiently handle millions of requests to save or update a key-value pair, as well as millions of requests to read the value of a key.
  • Ans. 

    Design a system to handle millions of requests for key-value operations efficiently.

    • Use a distributed key-value store like Redis or Cassandra for storing data.

    • Implement sharding to distribute data across multiple nodes for scalability.

    • Use caching mechanisms like Memcached to reduce read latency.

    • Implement load balancing to evenly distribute incoming requests.

    • Use asynchronous processing for write operations to improve pe...

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from International Institute of Information Technology Bangalore. I applied for the job as SDE - 2 in BengaluruEligibility criteria5+ years of experience.Microsoft interview preparation:Topics to prepare for the interview - Graph Algorithms(BFS,DFS), Greedy Programming, Dynamic Programming,Problems involving Arrays, LinkedList, Queues, Stacks,High Level Designs and Low Level Designs.Time required to prepare for the interview - 6 MonthsInterview preparation tips for other job seekers

Tip 1 : Solve atleast 1 DS/Algo problem everyday
Tip 2 : Learn high level designs and low level designs

Application resume tips for other job seekers

Tip 1 : Have your skills defined in bold like worked on scaling the system which takes 100 million traffic per day etc, have experience in BigData, kafka, AWS/Azure erc
Tip2 : Show your achievements separately like Won ABC Hackathon, ICPC Regional finalist, etc

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Amazon user image Anonymous

posted on 2 Apr 2015

Interview Questionnaire 

10 Questions

  • Q1. Find sum of all numbers that are formed from root to leaf path (code) expected time complexity O(n)
  • Ans. 

    Find sum of all numbers formed from root to leaf path in a binary tree

    • Traverse the binary tree using DFS

    • At each leaf node, add the number formed from root to leaf path to a sum variable

    • Return the sum variable

    • Time complexity: O(n)

    • Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25

  • Answered by AI
  • Q2. Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them. For example : ABC -> A BC, AB C, ABC, A B C
  • Ans. 

    Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.

    • Use recursion to generate all possible combinations of spaces

    • For each recursive call, either add a space or don't add a space between the current character and the next character

    • Base case is when there are no more characters left to add spaces between

    • Time complexity is O(2^n) where n is the length of the string

  • Answered by AI
  • Q3. Preorder traversal without using recursion
  • Ans. 

    Preorder traversal without recursion

    • Use a stack to keep track of nodes

    • Push right child first and then left child onto stack

    • Pop top of stack and print value

    • Repeat until stack is empty

  • Answered by AI
  • Q4. There is a 12 km road and a contractor who is in-charge of repairing it. Contractor updates you about the work which is done in patches. Like “Road between 3.2 km to 7.9 km repaired ”, “Road between 1.21 k...
  • Ans. 

    Find longest continuous patch on a 12 km road with updates in patches

    • Maintain a variable to keep track of current patch length

    • Update the variable whenever a new patch is added

    • Maintain a variable to keep track of longest patch so far

    • Compare current patch length with longest patch length and update if necessary

    • Use a sorted data structure like a binary search tree to store the patches for efficient search

    • Time complexity: ...

  • Answered by AI
  • Q5. Several Questions were asked from my project
  • Q6. Find median of an unsorted array. (code
  • Ans. 

    Find median of an unsorted array.

    • Sort the array and find the middle element

    • Use quickselect algorithm to find the median in O(n) time

    • If the array is small, use brute force to find the median

  • Answered by AI
  • Q7. General discussion on heaps
  • Q8. A stream of characters is coming, at any moment you have to tell ‘k’ elements closest to a given number (code)
  • Ans. 

    Find 'k' elements closest to a given number from a stream of characters.

    • Use a priority queue to keep track of closest elements.

    • Update the queue as new characters come in.

    • Return the 'k' closest elements from the queue.

  • Answered by AI
  • Q9. Design data structure that supports insert(), remove(), find-max(), delete-max() operations. All operations should run in O(1) time. Lots of discussion was there, discussed many approaches.
  • Ans. 

    Design a data structure with O(1) insert, remove, find-max, and delete-max operations.

    • Use a doubly linked list to maintain the elements in sorted order.

    • Use a hash table to store the pointers to the nodes in the linked list.

    • Maintain a pointer to the maximum element in the hash table.

    • Update the pointers in the hash table when inserting or removing elements.

    • Update the maximum pointer when deleting or inserting the maximum

  • Answered by AI
  • Q10. Check whether given link list represents palindrome
  • Ans. 

    Check if a given linked list is a palindrome.

    • Traverse the linked list and store the values in an array.

    • Compare the first and last elements of the array, then move towards the center.

    • If all elements match, the linked list is a palindrome.

    • Alternatively, use two pointers to find the middle of the linked list and reverse the second half.

    • Compare the first half with the reversed second half to check for a palindrome.

  • Answered by AI

Interview Preparation Tips

Round: Technical Interview
Experience: Recently I attended Amazon Bangalore interview for SDE 2 position. All f2f and no phone/written screening as I had attended one before and cleared those. Total 4 rounds wer der. The first techh round dey asked mi questions listed above.
Tips: NA

Round: Technical Interview
Experience: ROUND 2 dey asked mi above questions
Tips: NA

Round: Technical Interview
Experience: Round 3 Above questions wer asked.

Round: Technical Interview
Experience: This was the last round. thy asked mi above questions

College Name: NA

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Cisco user image Anonymous

posted on 21 Mar 2022

I was interviewed before Mar 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

2 coding question both and 15 MCQ

Only C , Java , Python are allowed

  • Q1. 

    Minimum Steps for a Knight to Reach Target

    Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position...

  • Ans. 

    Calculate the minimum number of moves a Knight requires to reach a specified target position on a chessboard.

    • Use breadth-first search (BFS) algorithm to find the shortest path for the Knight.

    • Consider all possible moves of the Knight on the chessboard.

    • Keep track of visited positions to avoid revisiting them.

    • Return the minimum number of moves required to reach the target position.

  • Answered by AI
  • Q2. 

    Maximum Size Rectangle Sub-matrix with All 1's Problem Statement

    You are provided with an N * M sized binary matrix 'MAT' where 'N' denotes the number of rows and 'M' denotes the number of columns. Your t...

  • Ans. 

    Find the maximum area of a submatrix with all 1's in a binary matrix.

    • Iterate over the matrix and calculate the maximum area of submatrices with all 1's.

    • Use dynamic programming to efficiently solve the problem.

    • Consider the current cell and its top, left, and top-left diagonal neighbors to calculate the area.

  • Answered by AI
Round 2 - Video Call 

(6 Questions)

Round duration - 45 minutes
Round difficulty - Easy

Around 6 am morning
2 interviewers

  • Q1. 

    Reverse Linked List Problem Statement

    Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.

    Input:

    The first line of input is an intege...
  • Ans. 

    Reverse a singly linked list by altering the links between nodes.

    • Iterate through the linked list and reverse the links between nodes

    • Use three pointers to keep track of the previous, current, and next nodes

    • Update the links between nodes to reverse the list

    • Return the head of the reversed linked list

  • Answered by AI
  • Q2. Can you explain synchronization in operating systems in detail?
  • Ans. 

    Synchronization in operating systems ensures proper coordination and communication between multiple processes or threads.

    • Synchronization is necessary to prevent race conditions and ensure data consistency.

    • Common synchronization mechanisms include mutexes, semaphores, and monitors.

    • Mutexes allow only one thread to access a resource at a time, preventing concurrent access.

    • Semaphores control access to a shared resource by ...

  • Answered by AI
  • Q3. Can you explain the OSI model and provide an example for each layer of data transfer?
  • Ans. 

    The OSI model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven layers.

    • Physical Layer: Transmits raw data bits over a physical medium (e.g. Ethernet cable)

    • Data Link Layer: Provides error detection and correction (e.g. MAC addresses in Ethernet)

    • Network Layer: Routes data packets between networks (e.g. IP addresses in Internet)

    • Transport Layer: Ensures reliable...

  • Answered by AI
  • Q4. What is a NAT router?
  • Ans. 

    A NAT router is a device that allows multiple devices on a local network to share a single public IP address for internet access.

    • NAT stands for Network Address Translation, which allows private IP addresses to be translated to a public IP address for communication over the internet.

    • NAT routers provide an added layer of security by hiding the internal IP addresses of devices on the network from external sources.

    • NAT rout...

  • Answered by AI
  • Q5. How would you compete with Google if you wanted to create a search engine?
  • Ans. 

    To compete with Google in search engine, focus on niche markets, improve user experience, and leverage AI technology.

    • Focus on niche markets where Google may not have as strong of a presence

    • Improve user experience by providing more relevant search results and faster load times

    • Leverage AI technology to personalize search results and enhance user experience

    • Invest in marketing and partnerships to increase visibility and us...

  • Answered by AI
  • Q6. What is the total amount of water on Earth?
  • Ans. 

    The total amount of water on Earth is approximately 1.386 billion cubic kilometers.

    • The majority of Earth's water is in the form of saltwater in the oceans, accounting for about 97.5% of the total water volume.

    • Only about 2.5% of Earth's water is freshwater, with the majority of that being stored in glaciers and ice caps.

    • The total amount of water on Earth is constantly cycling through the atmosphere, oceans, rivers, and

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 30 minutes
Round difficulty - Easy

Manager Round

  • Q1. Can you describe the challenges you faced during your master's thesis?
  • Ans. 

    I faced challenges in data collection, analysis, and time management during my master's thesis.

    • Difficulty in finding relevant research papers and data sources

    • Struggling with complex statistical analysis techniques

    • Managing time effectively to meet deadlines

    • Dealing with unexpected setbacks and technical issues

    • Balancing thesis work with other academic and personal commitments

  • Answered by AI
Round 4 - HR 

(1 Question)

Round duration - 10 Minutes
Round difficulty - Easy

Salary breakdown and Location preference

  • Q1. Are you satisfied with the salary breakup?

Interview Preparation Tips

Eligibility criteriaNoneCisco interview preparation:Topics to prepare for the interview - Computer Network Gate CS Level, Operating System college Level, Array and Linked List, Dynamic Programming, DFS and BFSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Computer Network should be strong
Tip 2 : Exposure to system programming also helps
Tip 3 : At least 150 problems and C++ was not allowed so prepare accordingly

Application resume tips for other job seekers

Tip 1 : Project should be really good
Tip 2 : Write Computer Network and Operating System Courses in resume as course taken

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via LinkedIn and was interviewed in Feb 2022. There were 5 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Coding Test 

Interview was around 1.15 hrs. Initially it was self introduction for both sides. Then a string manipulation related question was posted and asked to solve. At last it was queries to interviewer.

Round 3 - Case Study 

Total time 1hr. Self introduction for both parties.
Questions on CICD process in my project and automation ideas to handle errors with different scenarios. Then queries if any.

Round 4 - Coding Test 

Total time 1.15hr.
Self introduction and coding question related to linked list in codility. The question was enhanced depending on splving techniques. Finally queries.

Round 5 - HR 

(1 Question)

  • Q1. Why are you looking for a change?

Interview Preparation Tips

Interview preparation tips for other job seekers - It's ok if one doesnt know the exact answers for any questions. Attempt it with confidence. They will guide you got struck anywhere.
Listen to them keenly, they are always dropping hints in the middle
And if any doubts, always asks they prefer people with clarity as it's their motto.

I applied via Referral and was interviewed in Nov 2020. There was 1 interview round.

Interview Questionnaire 

3 Questions

  • Q1. Get excel column address based on number given.
  • Ans. 

    Get Excel column address based on number given.

    • Divide the number by 26 and get the remainder and quotient.

    • Convert the remainder to a character and add it to the result string.

    • Repeat until quotient is zero.

  • Answered by AI
  • Q2. Find if a given string exists in a given matrix of characters
  • Ans. 

    Find if a given string exists in a given matrix of characters

    • Iterate through each character in the matrix and check if it matches the first character of the given string. If it does, perform a depth-first search to check if the rest of the string can be formed from adjacent characters in the matrix.

    • Use a trie data structure to store all possible substrings of the matrix and check if the given string is present in the t...

  • Answered by AI
  • Q3. Video feed api design
  • Ans. 

    Designing a video feed API

    • Define endpoints for accessing video feeds

    • Include authentication and authorization mechanisms

    • Consider scalability and performance

    • Support different video formats and resolutions

    • Provide error handling and logging

    • Ensure data privacy and security

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare easy questions of Leetcode and prepare them well. Be true to yourselves, don't fake it. Be sure to know each and every aspect of projects in your resume very well.

Skills evaluated in this interview

I was interviewed in Aug 2022.

Round 1 - Face to Face 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

A problem solving round with 1 problem on DP. It was on a platform with a text editor provided. Was expected to solve the problem and write the code. Post initial discussion on the solution approaches came up with an optimized solution using Dynamic Programming and wrote the solution. Then some discussion on the Time and Space complexity of the solution. 

Interviewer was satisfied with the solution and also dry ran with 1 test case.

  • Q1. 

    Possible Words from a Phone Number: Problem Statement

    Given a string S composed of digits ranging from 2 to 9, determine all possible strings that can be created by mapping these digits to their correspon...

  • Ans. 

    Given a phone number string, generate all possible words by mapping digits to letters on a T9 keypad.

    • Create a mapping of digits to corresponding letters on a T9 keypad

    • Use recursion to generate all possible combinations of letters for the input phone number

    • Sort the generated strings in lexicographical order

  • Answered by AI
Round 2 - Face to Face 

Round duration - 60 minutes
Round difficulty - Hard

This round happened on the same day after 1st round. It was a Low level design round with one problem to be solved in 60 minutes.

Round 3 - Face to Face 

Round duration - 60 minutes
Round difficulty - Medium

This round happened on the same day after 2nd round. The platform used was codility. It was a System design/ Low level design round with one problem to be solved in 60min.

Round 4 - HR 

Round duration - 30 minutes
Round difficulty - Easy

It was an HR round with focus on the work ethics, culture and my prior experiences. The recruiter was trying to test my situation handling capability by asking different scenario based questions.

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteriaNo criteriaMicrosoft interview preparation:Topics to prepare for the interview - Data Structures, Graphs Algorithms, Dynamic programming, OOP concepts, Low level designTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Practice problems with consistency
Tip 2 : Learn and try to up solve
Tip 3 : Enjoy each problem and try different ways of solving it
Tip 4 : Brush up OOP concepts
Tip 5 : Practice hands on for Low level design by white board coding

Application resume tips for other job seekers

Tip 1 : Have 1-2 good quality projects.
Tip 2 : Try to maintain 1 page resume.
Tip 3 : Put things which you have in depth knowledge about in resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Tell us how to improve this page.

Interview Questions from Similar Companies

Accenture Interview Questions
3.8
 • 8.1k Interviews
Amazon Interview Questions
4.1
 • 5k Interviews
IBM Interview Questions
4.0
 • 2.3k Interviews
Reliance Retail Interview Questions
3.9
 • 1.5k Interviews
Flipkart Interview Questions
4.0
 • 1.3k Interviews
Oracle Interview Questions
3.7
 • 848 Interviews
Google Interview Questions
4.4
 • 826 Interviews
DMart Interview Questions
3.9
 • 403 Interviews
Cisco Interview Questions
4.1
 • 371 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

₹0 L/yr - ₹0 L/yr

Senior Software Engineer
1.3k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Engineer
801 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Development Engineer 3
260 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Business Development Associate
243 salaries
unlock blur

₹0 L/yr - ₹0 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