Wayfair | Senior Software Engineer | L4 | Bangalore | Rejected

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2024-06-22Added By Anonymous
Source: Link

Recently went through interview process of wayfair for Senior Software Engineer, L4 role.

Recruiter reached out to me after I have applied on Instahyre.

•Google meet connect with recruiter for the screening questions related to my current role & responsibilities after which recruiter asked to go ahead for the L4 role. Since it was for the Senior role hence no Online Assessment was required.
•Below is the interview experience for the Phone Interview round, the final verdict was No Hire & wasn't able to move through the onsite round. Cooling period of 6 months is applied.


Phone Interview Round :

Introduction (5 mins)

Coding/Problem Solving (20 mins)

We are working on a security system for a badged-access room in our company's building.

Given an ordered list of employees who used their badge to enter or exit the room, write a function that returns two collections:

All employees who didn't use their badge while exiting the room - they recorded an enter without a matching exit. (All employees are required to leave the room before the log ends.)

All employees who didn't use their badge while entering the room - they recorded an exit without a matching enter. (The room is empty when the log begins.)

Each collection should contain no duplicates, regardless of how many times a given employee matches the criteria for belonging to it.

records1 = [

["Paul", "enter"],

["Pauline", "exit"],

["Paul", "enter"],

["Paul", "exit"],

["Martha", "exit"],

["Joe", "enter"],

["Martha", "enter"],

["Steve", "enter"],

["Martha", "exit"],

["Jennifer", "enter"],

["Joe", "enter"],

["Curtis", "exit"],

["Curtis", "enter"],

["Joe", "exit"],

["Martha", "enter"],

["Martha", "exit"],

["Jennifer", "exit"],

["Joe", "enter"],

["Joe", "enter"],

["Martha", "exit"],

["Joe", "exit"],

["Joe", "exit"]

]


ENTER W/O EXIT EXIT W/O ENTER

Expected output: ["Steve", "Curtis", "Paul", "Joe"], ["Martha", "Pauline", "Curtis", "Joe"]

Other test cases:

records2 = [

["Paul", "enter"],

["Paul", "exit"],

]


Expected output: [], []

records3 = [

["Paul", "enter"],

["Paul", "enter"],

["Paul", "exit"],

["Paul", "exit"],

]


Expected output: ["Paul"], ["Paul"]

records4 = [

["Raj", "enter"],

["Paul", "enter"],

["Paul", "exit"],

["Paul", "exit"],

["Paul", "enter"],

["Raj", "enter"],

]


Expected output: ["Raj", "Paul"], ["Paul"]

All Test Cases:

mismatches(records1) => ["Steve", "Curtis", "Paul", "Joe"], ["Martha", "Pauline", "Curtis", "Joe"]

mismatches(records2) => [], []

mismatches(records3) => ["Paul"], ["Paul"]

mismatches(records4) => ["Raj", "Paul"], ["Paul"]

n: length of the badge records array


System Design (15 mins)

1Question1 : We are building a real time group chat app that consists of a backend server and a frontend web app. Our MVP needs to support multiple users joining a group. When a user is part of a group, that user should be able to send a message to all other users in the group and read all messages posted in the group. 2 3How would you design this group chat application, specifically what protocol(s) could be used to communicate between our server and client web app? 4 5------------------------------------------------------------------------------------------------------------------------------------------ 6 7Question 2 : We are working on a clone of Facebook. We want to add a numeric count to every post showing how many friends the post's author has at the time of viewing the post, like this: 8 9Marie McWilliams (105 friends) 10 11I had a great day today, feeling good! 12 13Our database has two tables: 14 15USER 16 17 'user_id' (primary key) 18 19 'name' 20 21 'created_date' 22 23USER_RELATIONSHIP 24 25 'friendship_id' (primary key, unique to each relationship) 26 27 'user1_id' (indexed) 28 29 'user2_id' (indexed) 30 31 'start_date' 32 33Focusing on the database, how would you implement the friend-count feature? Note we will soon be more popular than Facebook, so the solution needs to scale. 34 35------------------------------------------------------------------------------------------------------------------------------------------ 36 37Question 3: We are working on a clone of Google Docs that allows users to collaborate 38 39on documents. Many users can work on the same document at the same time. 40 41We have 100 instances of our service running on 100 different machines. 42 43Each document needs to be managed exclusively by one instance while it is 44 45in use, but one instance can handle multiple documents at once. 46 47We have a simple load-balancing system. Because each document has a random 48 49numeric ID found in the URL, we use the value of (id % num_instances) to 50 51route traffic. For example, with 100 jobs, traffic for document # 314814196 52 53is routed to the instance with index 96. 54 55How will this system perform as the usage grows? 56 57------------------------------------------------------------------------------------------------------------------------------------------ 58 59Question 4: Which consistency model is more appropriate for each of these applications: strong consistency, or eventual consistency? Why? (Select the best answer that applies for each question). 60 61An API call that needs to respond within 20 milliseconds, used by a web service to retrieve metadata about a piece of streaming media. 62A web analytics platform recording every single click on a web page. 63A banking system that makes deposits and payments to checking accounts.


Conclusion/Ask questions to Interviewer (5 mins)

Comments