Moveinsync Technology Solutions
20+ Walmart Interview Questions and Answers
Q1. Sort the array which consists of 0's, 1's , 2's. (Two Pointer approach)
Sort an array of 0's, 1's, and 2's using two pointer approach.
Initialize two pointers, one at the beginning and one at the end of the array.
Traverse the array and swap 0's to the beginning and 2's to the end using the pointers.
Stop when the pointers meet or cross each other.
Q2. Search in the rotated Sorted array. (Binary Search - pivot)
Search for an element in a rotated sorted array using binary search with pivot.
Find the pivot element using binary search.
Compare the target element with the first element of the array to determine which half to search.
Perform binary search on the selected half of the array.
Repeat until the target element is found or the array is exhausted.
Q3. Tell me about id selector in CSS
ID selector is used to select an element with a specific ID attribute in CSS.
ID selector is denoted by '#' followed by the ID name.
ID should be unique on a page.
ID selector has higher specificity than class selector.
Example: #header { color: blue; }
Q4. DSA : Search an element in infinite soted array
Search an element in an infinite sorted array using binary search.
Initialize low as 0 and high as 1.
Double the high index until arr[high] is greater than the target element.
Perform binary search between low and high indexes.
Q5. Differences between ShallowCopy & DeepCopy
ShallowCopy copies only the reference of an object while DeepCopy creates a new object with a new reference.
ShallowCopy creates a new reference to the same object, so changes made to the copy will reflect in the original object.
DeepCopy creates a new object with a new reference, so changes made to the copy will not reflect in the original object.
ShallowCopy is faster and less memory-intensive than DeepCopy.
DeepCopy is necessary when you need to modify the copied object withou...read more
Q6. Differences between struct and class
Struct is a value type while class is a reference type in C#.
Structs are stored on the stack while classes are stored on the heap.
Structs cannot be inherited while classes can be inherited.
Structs do not support destructors while classes do.
Structs are used for small data structures while classes are used for larger, more complex objects.
Example of struct: struct Point { public int X; public int Y; }
Example of class: class Person { public string Name; public int Age; }
Q7. Define Copy Constructor
Copy constructor is a special constructor that creates a new object by copying an existing object.
It is used to create a new object with the same values as an existing object.
It takes an object of the same class as a parameter.
It is automatically called when a new object is created from an existing object.
It creates a deep copy of the object, meaning that all the member variables are copied.
Example: class MyClass { public: MyClass(const MyClass& obj) { // copy constructor cod...read more
Q8. How will you solve the supply demand issue in peak time in Cab aggregator industry?
I will implement dynamic pricing and incentivize drivers to work during peak hours.
Implement dynamic pricing to encourage more drivers to work during peak hours
Incentivize drivers with bonuses or higher pay during peak hours
Partner with other transportation companies to increase the supply of available vehicles
Use data analysis to predict peak times and adjust supply accordingly
Offer alternative modes of transportation such as bikes or scooters during peak hours
Q9. Define Operator overloading
Operator overloading allows operators to have different meanings based on the context of their usage.
Operator overloading is a feature in object-oriented programming languages.
It allows operators to be redefined for custom classes.
For example, the '+' operator can be overloaded to concatenate strings or add numbers.
It can improve code readability and reduce the amount of code needed for certain operations.
Q10. How can you build a bottle for a billionarie baby?
To build a bottle for a billionaire baby, focus on luxury materials, unique design, and advanced technology.
Use high-quality materials such as gold, silver, or crystal to create a luxurious feel.
Incorporate a unique and stylish design that sets it apart from regular baby bottles.
Include advanced technology features like temperature control or self-cleaning capabilities.
Offer customization options such as engraving the baby's name or birthdate for a personalized touch.
Q11. Design a reporting analytics system for the organization
Design a reporting analytics system for the organization
Identify key metrics to track
Determine data sources and integrate them into a centralized database
Develop a user-friendly dashboard for data visualization
Implement automated reporting and alerting
Ensure data security and privacy
Continuously evaluate and improve the system
Q12. How would you improve Google Maps?
Improve Google Maps by enhancing real-time traffic updates and integrating public transportation options.
Enhance real-time traffic updates to provide more accurate and timely information to users
Integrate public transportation options for seamless navigation between driving and public transit
Improve user interface for easier navigation and search functionality
Q13. How does a Lambada function work?
A Lambada function is an anonymous function that can be defined in a single line of code and passed as an argument to other functions.
Lambada functions are commonly used in functional programming languages like Python and JavaScript.
They are often used for tasks that require a short, simple function without the need to define a separate named function.
Example: lambda x: x*2 defines a Lambada function that doubles the input value x.
Q14. How does a load balancer works?
A load balancer distributes incoming network traffic across multiple servers to ensure optimal resource utilization and prevent overload.
Distributes incoming traffic evenly across servers
Monitors server health and redirects traffic away from unhealthy servers
Improves reliability and scalability of applications
Examples: Nginx, HAProxy, AWS Elastic Load Balancer
Q15. What are APIs? How does a browser Work?
APIs are sets of rules and protocols that allow different software applications to communicate with each other. A browser works by sending requests to servers to retrieve and display web pages.
APIs are sets of rules and protocols that allow different software applications to communicate with each other.
They define the methods and data formats that applications can use to request and exchange information.
Examples of APIs include the Google Maps API, which allows developers to ...read more
Q16. Design IMDB. how will you manage concurrent ratings
Design IMDB with concurrent ratings management
Implement a locking mechanism to ensure only one user can update a rating at a time
Use a queue system to handle multiple rating requests in an orderly manner
Consider using distributed systems to handle high concurrency levels
Q17. What is Bad debt?
Bad debt refers to money owed by a debtor that is unlikely to be paid back, resulting in a loss for the creditor.
Bad debt is typically the result of customers defaulting on their payments.
It is recorded as an expense on the creditor's financial statements.
Companies may write off bad debts to remove them from accounts receivable.
Examples include unpaid invoices, loans that are not repaid, and credit card debt that goes into default.
Q18. 1. For a leaderboard fetch ranking for a given user and 5 users above and below this user, where data set is huge in terra bytes 2. Find longest substring with max 2 distinct chars in a list
Fetch leaderboard ranking for a given user and neighbors, handle huge dataset
Use a distributed system like Hadoop or Spark to handle the huge dataset
Implement a ranking algorithm to efficiently fetch the leaderboard
Retrieve the ranking for the given user and fetch 5 users above and below
Ensure the solution is scalable and can handle increasing data size
Q19. Design milk bottle for 6 months old baby
Design a milk bottle for 6-month-old babies that is easy to hold and clean.
The bottle should have a small nipple to fit the baby's mouth
The bottle should be made of BPA-free materials
The bottle should have a wide base for stability
The bottle should be easy to clean and sterilize
The bottle should have measurement markings for accurate feeding
Q20. Design vehicle rental system. Api design
Design a vehicle rental system API
Create endpoints for listing available vehicles, booking a vehicle, and returning a vehicle
Include authentication and authorization mechanisms for users and admins
Implement payment gateway integration for processing rental payments
Include features like vehicle search, filtering, and reviews/ratings
Consider scalability and performance optimizations for handling high traffic
Q21. Search in a list of strings
Use a loop to search for a specific string in an array of strings.
Iterate through each string in the array
Use a conditional statement to check if the current string matches the search string
Return the index of the matching string or -1 if not found
Q22. Stock span problem (leetcode)
Stock span problem is a financial problem where we have a series of n daily price quotes for a stock and we need to calculate the span of stock's price for all n days.
Use a stack to keep track of the previous days' prices and their spans.
For each day, pop the stack until a price greater than the current day's price is found, then calculate the span.
Push the current day's price and span onto the stack.
Q23. Find in rotated sorted array
Search for a target value in a rotated sorted array.
Use binary search to find the pivot point where the array is rotated.
Determine which half of the array the target value lies in based on the pivot point.
Continue binary search in the appropriate half of the array to find the target value.
Q24. 2. Design a job scheduler
A job scheduler is a software application that manages the scheduling of tasks or jobs to be executed by a computer system.
Define the job scheduling requirements such as priority, deadline, resource constraints, etc.
Implement a scheduling algorithm like First Come First Serve, Shortest Job First, Round Robin, etc.
Maintain a queue of jobs to be executed and allocate resources accordingly.
Monitor job execution and handle any exceptions or errors that may occur.
Optimize the sche...read more
Q25. Explain about recent issue
The recent issue involved a critical production outage due to a database connection failure.
The issue occurred during peak hours, impacting customer experience.
Root cause was identified as a misconfiguration in database connection settings.
Immediate action was taken to restore service and prevent future occurrences.
Post-mortem analysis conducted to implement preventive measures.
Collaboration with database administrators to optimize connection settings.
Top HR Questions asked in Walmart
Interview Process at Walmart
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month