Walmart | IN3 | BLR | April 2022 [Offer]
Anonymous User
1419

Education: B.Tech from NIT
Years of experience: 1 yr 10 months at a Product based company

I participated in Call Of Code competition arranged by Walmart on HackerEarth. After around 2 weeks, hr contacted me for interview. There were 3 rounds of interview.

Round 1 (Technical) : 1.5 hrs

  1. Questions around current work experience
  2. Find the element which appears twice in an array.
    I discussed two approach. One based on map and another based on bit manipulation. Interviewer asked me to code the solution based on bit manipulation.
  3. https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/
    Discussed Recursive approach using recursion stack. Interviewer asked me if we can do it in iterative approach using O(1) space. Discussed around it and finally was able to come up with the solution.
  4. Had some discussions around Low level design. I didn't have much idea about LLD round. Just approached by finding requirements and focused on writing re-usable code which are less dependent on each other. Interviewer was happy with the code.

Round 2( HM ) : 1.5 hrs

  1. Started with introduction and normal discussions around current project.
  2. Ds question: Sort an array of 0s and 1s.
    Gave a two-pass approach. Interviewer asked to do it one-pass. Coded the one-pass solution.
  3. Max Stack Problem: Design a max stack that supports push, pop, top, peekMax and popMax.
    push(x) -- Push element x onto stack.
    pop() -- Remove the element on top of the stack and return it.
    top() -- Get the element on the top.
    peekMax() -- Retrieve the maximum element in the stack.
    popMax() -- Retrieve the maximum element in the stack, and remove it. If you find more than one maximum elements, only remove the top-most one.
    The complexity for each function should be O(1) as it is for stack functions.
    I gave an approach using 2 stacks. Interviewer asked me to give a solution having O(1) space complexity.
    I was not able to solve it for sometime. He gave me a hint to think which values we can store in a stack.
    I got an idea to create a custom class which will have two values, the value which we are pushing and the max value at that point so that when we will pop this element we can findout the previous max element in O(1) time and update the max value accordingly.
    Interviewer asked me to write a code for this and tried few testcases. He was satisfied with it.
  4. Some discussions around OOPS.
  5. Aksed 2 puzzles. I was able to answer both.
  6. Some normal managerial questions and discussion about the role of the position.

Round3 :

  1. HR discussion
  2. Salary expectations and benefits explanations.

Salary details: https://leetcode.com/discuss/compensation/2065712/Walmart-or-IN3-or-Bangalore

Comments (1)