Walmart Interview Experience for SDE-3

23 Jun, 2021
Round 1(DSA): Write code for following programs, optimize and deduce the time complexities:
Given the arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for the railway station so that no train waits.We are given two arrays that represent the arrival and departure times of trains that stop.Input: 
arr[] = {9:00, 9:40, 9:50, 11:00, 15:00, 18:00}
dep[] = {9:10, 12:00, 11:20, 11:30, 19:00, 20:00}
Output: 
3
Explanation: There are at-most three trains
at a time (time between 11:00 to 11:20)
Input: 
arr[] = {9:00, 9:40}
dep[] = {9:10, 12:00}
Output: 1
Explanation: Only one platform is needed.
2.Produce a mirror tree for an n-ary tree.
Given the arrival and departure times of all trains that reach a railway station, the task is to find the minimum number of platforms required for the railway station so that no train waits.We are given two arrays that represent the arrival and departure times of trains that stop.Input: 
arr[] = {9:00, 9:40, 9:50, 11:00, 15:00, 18:00}
dep[] = {9:10, 12:00, 11:20, 11:30, 19:00, 20:00}
Output: 
3
Explanation: There are at-most three trains
at a time (time between 11:00 to 11:20)
Input: 
arr[] = {9:00, 9:40}
dep[] = {9:10, 12:00}
Output: 1
Explanation: Only one platform is needed.
2.
We are given two arrays that represent the arrival and departure times of trains that stop.
Input: 
arr[] = {9:00, 9:40, 9:50, 11:00, 15:00, 18:00}
dep[] = {9:10, 12:00, 11:20, 11:30, 19:00, 20:00}
Output: 
3
Explanation: There are at-most three trains
at a time (time between 11:00 to 11:20)
Input: 
arr[] = {9:00, 9:40}
dep[] = {9:10, 12:00}
Output: 1
Explanation: Only one platform is needed.
2.
Produce a mirror tree for an n-ary tree.
Round 2(Programming / Design):
Design a complete employee management system using 2 microservices for updating reading and creating employee information.a. Define controllers/APIs for the same.b. What DB should be used? Why? Data types to be used in DB? Reasons? Define DB Schema. Write SQL queries for all the operations possible.Internal working of HashMap. : (explained about the working and how equals() and hashCode() method play their role)Followup Question: Implement hashCode for each employee entry in the above system so that there is no collisionGiven a number S. Given an array of n numbers. Find whether there are 2 elements in the array such that there sum is equal to S. if present return the indices. Expected time complexity O(nlogn)
Design a complete employee management system using 2 microservices for updating reading and creating employee information.a. Define controllers/APIs for the same.b. What DB should be used? Why? Data types to be used in DB? Reasons? Define DB Schema. Write SQL queries for all the operations possible.
a. Define controllers/APIs for the same.
b. What DB should be used? Why? Data types to be used in DB? Reasons? Define DB Schema. Write SQL queries for all the operations possible.
Internal working of HashMap. : (explained about the working and how equals() and hashCode() method play their role)Followup Question: Implement hashCode for each employee entry in the above system so that there is no collision
Followup Question: Implement hashCode for each employee entry in the above system so that there is no collision
Given a number S. Given an array of n numbers. Find whether there are 2 elements in the array such that there sum is equal to S. if present return the indices. Expected time complexity O(nlogn)
Round 3(Hiring Manager Round):
Explain about ExecutorService in java. Explain thread pools and working.How should we determine the number of threads to be used for different kinds of operations.Explanation about CPU-intensive and io-intensive operations.Explain all the new features of java 8.(Functional interface – lambda, java streams, date-time APIs, default method in interfaces, etc)Questions on java HashMap. How the internal working has changed in the latest version of java.Project-related questions. Working on the projects. Tech stack used.Questions related to java stack overflow and recursive constructors.Behavioural questions.
Explain about ExecutorService in java. Explain thread pools and working.How should we determine the number of threads to be used for different kinds of operations.Explanation about CPU-intensive and io-intensive operations.
How should we determine the number of threads to be used for different kinds of operations.
Explanation about CPU-intensive and io-intensive operations.
Explain all the new features of java 8.(Functional interface – lambda, java streams, date-time APIs, default method in interfaces, etc)
(Functional interface – lambda, java streams, date-time APIs, default method in interfaces, etc)
Questions on java HashMap. How the internal working has changed in the latest version of java.
Project-related questions. Working on the projects. Tech stack used.
Questions related to java stack overflow and recursive constructors.
Behavioural questions.
Marketing
Walmart
Interview Experiences
Walmart
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.