Walmart IN3 | March 2021| Full stack Developer | Bangalore
Summary
I was contacted by a consultancy regarding a Full Stack Developer role at Walmart in Bangalore. I went through two rounds, which covered problem-solving, backend, and frontend discussions, and I am currently awaiting the response for the second round.
Full Experience
Interview Experience at Walmart - Full Stack Developer
I was contacted by a consultancy about a potential switch and decided to explore the Full Stack Developer role at Walmart in Bangalore.
First Round: Problem Solving and Backend Discussion
This round started with a general introduction, a discussion about my current project, tech stack, and my familiarity with Java, as I didn't have direct work experience in it.
The technical questions included:
- Three Sum Problem: We had a detailed discussion on how to optimize this problem to achieve an O(n^2) time complexity, moving beyond an O(n^3) solution. The interviewer was very keen on my understanding of big O notation and the fundamentals of calculating various complexities.
- Count Leaves in a Binary Tree: I was asked to count the number of leaves in a binary tree.
- SQL Query Problem: This was a scenario-based question involving two tables,
Table1andTable2, both containingname,loc, anddatetimecolumns. The task was to write a SQL query to select de-duplicated records based onloc, ensuring that for each location, only the record with the highestdatetimewas returned. While I couldn't completely formulate the query on my own, the interviewer provided assistance, and we arrived at a mutually agreed-upon solution.
Second Round: Problem Solving and Front-end Discussion
This round began with an introduction, focusing on my front-end experience, familiarity with various front-end frameworks, JavaScript, and ES6.
The discussion then moved to several front-end and general programming concepts:
- Trapping Rain Water Problem: I was asked to discuss my approach and provide pseudo-code for this problem.
- Design Patterns: The interviewer asked about design patterns I had used, specifically asking me to explain the Builder pattern with an example.
- Webpack: We discussed what Webpack is and how it functions.
- Dependency Injection: I was asked to explain Dependency Injection.
- Closures: A question about JavaScript closures.
- DOM Manipulation: Discussion around DOM manipulation techniques.
- Virtual DOM Manipulation in React: Specifically, how the Virtual DOM works in React.
- Rendering Cache: A discussion on rendering cache.
- Variable Hoisting: Explanation of variable hoisting in JavaScript.
- Tree Shaking: What tree shaking is and how it's used.
- Web Workers: I was asked about Web Workers. While I wasn't familiar with them, I brought up Service Workers and explained them effectively.
- Web Components: A discussion on Web Components.
varvs.let: The differences betweenvarandletin JavaScript.- Functional vs. Object-Oriented Programming: The distinctions between these two programming paradigms.
- Node.js Internal Architecture: How Node.js works internally and handles asynchronous operations.
- React Hooks: Discussion about React Hooks.
- Code Optimization Methods: Various approaches to optimizing code.
- Finally, I was given an opportunity to ask questions to the interviewer.
I am currently waiting for the response from the second round.
Interview Questions (20)
Discuss the Three Sum problem, focusing on how to optimize its time complexity from O(n^3) to O(n^2). The interviewer was looking for a deep understanding of big O notation and the fundamentals of complexity calculation.
Count the total number of leaf nodes present in a given binary tree.
Given two tables, Table1 and Table2, each with columns name, loc, datetime:
Table1:
name,loc,datetime
abc,india,20200419
xyz,us,20200512
bbb,india,20190101
ccc,mexico,20200105
zzz,india,20180406
sss,us,20200420
Table2:
name,loc,datetime
abc,india,20180419
xyz,uk,20180111
Write a SQL query to select de-duplicated records (from the combination of both tables) based on 'loc' with the highest 'datetime'. The final output should have only one record per location, with its own highest datetime.
Expected Output:
name,loc,datetime
abc,india,20200419
xyz,us,20200512
ccc,mexico,20200105
xyz,uk,20180111
Discuss the approach and provide pseudo-code for the Trapping Rain Water problem.
Discuss design patterns you have used and specifically explain the Builder pattern with an example.
Explain what Webpack is and how it works.
Explain Dependency Injection.
Explain what closures are in JavaScript.
Discuss DOM Manipulation.
Explain Virtual DOM manipulation in React.
Discuss rendering cache.
Explain variable hoisting in JavaScript.
Explain tree shaking.
Discuss Web Workers. Although I wasn't familiar with them, I explained Service Workers effectively.
Discuss Web Components.
Explain the difference between var and let in JavaScript.
Explain the difference between functional programming and object-oriented programming.
Discuss Node.js internal architecture and how it handles asynchronous operations.
Discuss React hooks.
Discuss various methods for code optimization.