I did my Summer Internship at Walmart in the AdTech department under the Data Science team. I got into this internship through the Walmart Sparkplug program, where I was fortunate to be among the Top 100 students selected. You can read my internship interview experience here Internship Process
After the internship, I appeared for the PPO (Pre-Placement Offer) Conversion Process. The process consisted of two technical rounds, followed by managerial feedback.
Round 1 – Technical (1 hour)
The interview started with introductions and then a DSA question was given to solve:
You are given a string consisting of lowercase letters, whitespaces and operators + and -. You have to evaluate the final expression and return the simplified result.
Example:
Input: a+b+a+b-a+c
Output: a+2b+c
My Approach:
- I used a 26-sized vector to store counts of each character.
- If + was before a character → increment count.
- If - was before a character → decrement count.
- Finally, I iterated over the map and constructed the result expression with non-zero counts.
Then, I compiled the code and worked well for the test cases and it also handeled the edge cases.
I discussed time & space complexity, after which the interviewer gave a follow-up:
Now extend this solution to handle brackets () along with characters and +, -.
My Follow-up Approach:
- I suggested first expanding the brackets and creating a modifed expression without brackets and then reusing my earlier function.
- For handling brackets:
- Used a stack to manage nested expressions where stack consited of strings inside it.
- If a negative sign appeared before a bracket, I had to negate the entire substring inside it.
- Wrote a helper function to negate subexpressions (handling reversals and sign changes).
- Then pushed back the entire negated expression inside the stack again
- Then iterated the stack and constructed the modifed expression and handeled the reversals while construction
- Then reused the same function defined in previous approach over this.
After debugging for 10 minutes, I got the correct output.
The interviewer said this was a hard problem and seemed happy with the solution. The round ended with some light discussions about the Walmart teams.
Later after the interview, I realized it was quite close to a LeetCode Hard problem (with integers), but here we had alphabets instead of numbers, making it more complex while performing stack operations.
Round 2 – Technical (1 hour)
Started with introductions and a short discussion of my Walmart summer internship project. Interviewer explained the flow of interview: short CS fundamental questions, then DSA, and finally database.
CS Fundamentals & Programming:
- OOPs 4 pillars (Explanation of each)
- Method Overloading vs Overriding
- Deadlocks in OS
- Memory management in C++ (delete keyword)
- Pointers & dereferencing
- Linked List: finding middle element using slow/fast pointer
DSA Questions:
1) Remove duplicates from a sorted array (continuous duplicates).
- First: Map-based solution (extra space).
- Then optimized: Two-pointer approach (in-place, O(1) space).
- Follow-ups:
- Unsorted array, duplicates continuous → Same 2-pointer works.
- Unsorted, duplicates non-continuous, no extra space →
- I first thought of binary search.
- Interviewer suggested sorting + reuse same function.
- Then I gave a inary search based approach to skip insertion if key present and otherwise lower bound based sorted insertion → interviewer was impressed.
2) In a binary array, count number of subarrays with sum = target.
- First: Brute force O(n^2).
- Then: Optimized Sliding Window with 2 while loops one after other inside for loop
- 1st while loop for expanding when sum=target but we can include next indexes if they are zero
- 2nd while loop for shrinking the window.
- Interviewer hinted → I modified approach to:
- countSubarrays(sum == target) = count(sum <= target) - count(sum <= target-1)
- This worked well.
- Ran both approaches on testcases and it worked.
SQL:
Find Nth highest salary.
Answer: Use ORDER BY DESC LIMIT OFFSET with DISTINCT for duplicates.
The interview ended with me asking about the interviewer’s experience at Walmart. Before wrapping up, she asked if I would change anything about my performance in the interview so far. I mentioned the sliding window question, but she assured me that my first approach was also correct. I explained the trade-off between the two methods. She seemed happy with my reasoning and overall performance.
Wrap-up
Both rounds were purely technical.
I got very good feedback from interviewers.
Finally, I received a PPO for SDE-2 at Walmart
Key Takeaways:
Be thorough with DSA and consider all edge cases while coming up with a solution.
Revise CS fundamentals (OOPs, OS, DBMS).
Be confident in explaining your projects.
Don’t worry if your first approach is brute force — optimize step by step.
Best of luck to all future aspirants!