Walmart | SDE 2 | 4+ YOE
- Result
- Rejected
- Experience
- 4 years
- Posted
- 2 Mar 2024
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.
How it went
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.
Questions asked (8)
- 01
Right Side View of Binary Tree
Data Structures & Algorithms
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.
- 02
Maximum Subarray Sum (Kadane's Algorithm)
Data Structures & Algorithms
Find the contiguous subarray within a one-dimensional array of numbers which has the largest sum. Implement using Kadane's Algorithm.
- 03
Clone Linked List with Random Pointer
Data Structures & Algorithms
Given a linked list where each node has a next pointer and a random pointer, create a deep copy of the list.
- 04
Data Structure for Key Count at Timestamps
Data Structures & Algorithms
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.
- 05
Debugging Sudden Memory Increase (JVM GC)
Other
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)?
- 06
Java Memory Model Concepts
Other
Explain the Java Memory Model (JMM), including concepts like main memory, working memory, happens-before guarantees, and its role in concurrency.
- 07
Multithreaded Even Odd Printer
Data Structures & Algorithms
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.
- 08
System Design: E-commerce Past Purchase Page
System Design
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.