Sharing a recent Walmart Full Stack OA experience from a candidate who took it.
The OA is divided into three parts:
Algorithm
Spring Boot Backend
React Frontend
The Algorithm section tests sliding window (I forgot whether AI assist was available; I didn’t use it).
The Spring Boot section tests debugging configuration/profile loading (AI assist).
The React section tests debugging state management and AJAX interactions with the backend (AI assist).
Here are the details:
Algorithm problem:
You are a teacher leading a group of talents to participate in competitions, similar to a teacher leading a school team. Each talent specializes in a particular subject, and different competitions require different numbers of unique subjects. You need to return the minimum subarray length, starting from each talent and moving from left to right, that satisfies the competition’s required unique subjects count.
Two inputs:
integer array (talents) - The value of each element (talent) represents the subject that this talent specializes in.
integer (required unique subjects count) - The number of unique subjects required by the competition.
example:
Input:
[1, 2, 3, 4, 3, 5]
3
Output:
[3, 3, 4, 3, -1, -1]
The three 3s in the output represent the lengths of [1, 2, 3], [2, 3, 4], and [4, 3, 5], respectively.
The 4 in the output represents the length of [3, 4, 3, 5].
The -1s indicate that, looking to the right, it is no longer possible to collect 3 unique subjects. (Note: I forgot whether the expected return value was 0 or -1.)
Sliding window + HashMap count (or int array count) can achieve an O(n) solution.
Spring Boot Backend
This section mainly tests Spring Boot configuration loading, Profiles, and dependency injection.
Make sure you’re familiar with:
How to use @Value, including how to specify default values.
The override mechanism of application.properties (Note: It might also be presented in yml format).
The syntax for specifying a profile (To be safe, familiarize yourself with both the syntax in main and the syntax in scripts).
The following is for reference only. Please test it locally yourself:
public static void main(String[] args) {
new SpringApplicationBuilder(MyApplication.class)
.profiles("dev") // Specify "dev" as the active profile
.run(args);
}
java -jar app.jar –spring.profiles.active=dev
Pay special attention to the red error messages in the console log. Even if the test cases pass, red error messages in the console log may actually indicate test case failures under the staging profile.
One of the staging profile test case failures was due to a missing implementation: if user credentials are missing, you need to throw a specific exception.
Another staging profile test case failure was related to a missing default value or a default value not being configured correctly. I ran out of time and couldn’t identify the root cause…
React
There’s a website where users can add movies to their watchList. The bug is that after a user adds a movie, it still doesn’t appear in their watchList.
The project structure is roughly as follows:
movieDetail page: Users can add movies to their watchList.
watchList page: Displays the movies that have been added.
watchListController: Handles requests.
I ultimately couldn’t identify the root cause of the bug, so the following is just for reference:
Check the state (inWathchList) in movieDetail that indicates whether a movie is already in the user's watchList.
Check how watchListController determines the userId (from a parameter or token).
Check the call path for fetching the watchList (including all inputs, such as the token).
Important note:
When reproducing the bug, you need to log in, but the user credentials provided in the problem cannot be directly copied and pasted into the UX component…
I wasted quite a bit of time entering the user credentials because testing required logging in repeatedly.
I suggest typing the credentials into the coding interface and then commenting them out. (You can copy/paste within the coding interface, but I’m not sure whether you can copy/paste from the coding interface into the UX component. I didn’t get a chance to try it, so I’m just suggesting a possible workaround.)
However, make absolutely sure to remove them before submitting your solution to avoid getting red-flagged for leaving user credentials in the code.
AI Assisted Part
You can ask questions about syntax.
You can ask AI to list all AJAX calls in a file and locate the files corresponding to specific operations, etc.
AI seems to have specific restrictions on questions about the root cause of bugs. When I asked about a particular React state or a specific AJAX call path, it told me I had to investigate it myself. So when AI starts refusing to answer, you might actually be on the right path.