Walmart | SDE 2 | 4+ YOE
Summary
I interviewed for an SDE 2 position at Walmart, which involved multiple rounds covering coding, Java fundamentals, and system design. Unfortunately, I was rejected after the system design round.
Full Experience
My interview process for the SDE 2 role at Walmart consisted of four distinct rounds.
The first round was a 60-minute coding challenge. I was asked to solve problems like the Right Side View of a Binary Tree and one related to Kadane's theorem, likely focusing on the Maximum Subarray Sum.
The second round was another 60-minute coding session. Here, I tackled a problem involving cloning a linked list, often referring to a linked list with random pointers. Additionally, I was challenged to design a data structure capable of storing key counts at each timestamp, optimized for 'put' and 'get' operations.
The third round was a 60-minute Java-focused discussion. This round was quite intense, with significant grilling on language internals. Key areas of discussion included debugging sudden memory increases in a production environment without metrics, which led to a deep dive into Java Garbage Collection (GC), and the intricacies of the Java Memory Model. I also had to code a multithreaded program to print even and odd numbers sequentially.
Finally, the fourth round was a System Design HLD (High-Level Design) session. The first 30 minutes were spent discussing my past projects in depth. The remaining 30 minutes were allocated to system design, which I felt was insufficient for a proper evaluation. The core design problem was to design a 'Past Purchase Page' for an E-commerce website. This included features like displaying order details (OrderId, Amount, items), showing price distribution on item click, search functionality, and time-based filtering.
Ultimately, I was rejected after the system design round.
Interview Questions (8)
Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
Find the contiguous subarray within a one-dimensional array of numbers which has the largest sum. Implement using Kadane's Algorithm.
Given a linked list where each node has a next pointer and a random pointer, create a deep copy of the list.
Design a data structure that can store key counts at specific timestamps. It should support efficient 'put' (add a key count at a timestamp) and 'get' (retrieve the count for a key at a specific or latest timestamp) operations.
In a production environment without dashboards or metrics, how would you approach debugging a sudden increase in host memory usage? Specifically, what would you investigate related to Java's Garbage Collection (GC)?
Explain the Java Memory Model (JMM), including concepts like main memory, working memory, happens-before guarantees, and its role in concurrency.
Write a multithreaded Java program where one thread prints even numbers and another thread prints odd numbers, ensuring they print sequentially (e.g., 1, 2, 3, 4...). Provide the code implementation.
Design the system for an E-commerce 'Past Purchase' page. Key features include: displaying past purchases with OrderId, Amount, and List of items; showing price distribution of each item upon clicking an OrderId; search capability (e.g., search for 'apple' in past purchases to get relevant OrderIds); and filtering based on time.