Walmart Interview Experience

Round 1 (Coding and iOS)

Walmart Interview Experience

Round 1 (Coding and iOS)

It start with introduction and then questions obviously.

1. Convert nested dictionary into flattened dictionary

Input = [“a”: [“b”: [“c”: “1”, “d”: “1”]],“e” : “1” ,“f” : [“g”: [“h”: “1”]]]
Output = [“h”: “1”, “d”: “1”, “g”: 1, “a”: 3, “e”: “1”, “c”: “1”, “f”: 2, “b”: 2]

Not like below:
let arrayOfDictionaries = [["key1": "value1"], ["key2": "value2"], ["key3": "value3", "key4": "value4"]]


//the end result will be:
flattenedArray = ["key1": "value1", "key2": "value2", "key3": "value3", "key4": "value4"]

2. Output for the below program

struct Tutorial {
var difficulty: Int = 1
}

var tutorial1 = Tutorial()
var tutorial2 = tutorial1
tutorial2.difficulty = 2
print(tutorial1.difficulty, tutorial2.difficulty)

Ans: 1 2

3. Will this compile?

import UIKit

var view1 = UIView()
view1.alpha = 0.5

let view2 = UIView()
view2.alpha = 0.5 // Will this line compile?

Ans: YES

4. Write a code for two view controllers which can be embed as a child controller and communication between them.

for ex:

ColorToggleViewController: [ColorViewController (Top), ToggleViewController(with button on bottom)]

When user press button on bottom vc(ToggleViewController), colorVC will change the color.

  • Try your own :)

Round — 2 (DS & Algo)

  1. Given a 2D array, print it in spiral form. See the following examples.

Example:

Input: [[1,2,3],[4,5,6],[7,8,9]]

Output: 1 2 3 6 9 8 7 4 5

Explanation :The output is matrix in spiral format.

2. Do the reverse of spiral question.

Round-3(Design)

System Design : A search app to search for products- infinite scroll of results. can apply filters.

Approach:

  1. 5–10 Min for questions to have clear picture of system
  2. 15 Min to design the API, define params and its use cases
  3. 15 Min to design front end network layer
  4. 10 Min to design front end layer
  5. 10 Min for communication between Network and frontend layer

Round-4(Hiring Manager)

  1. How do you deal with stakeholders in current company as well as in past company?
  2. Project discussion, behavioural questions etc

Thanks for reading, Keep reading 📚, Keep growing.