Facebook || Technical Screening

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-09-22Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Technical Screening
Location: unknown
Year: unknown

Original Post Content:

Interviewer spent 5 mins for introductory discussion and then pasted this question in the coderpad.

Question 1: Merge three sorted arrays, input arrays can contain duplicates but sorted output list should not contain duplicate elements.
Missed this edge case:
A = [1];
B= [];
C = [];
Corrected shortly after interviewer pointed this out.

Question 2: Return true or false based upon Subarray sum equals K.
e.g.
[1,3,1,4,2,5] & K = 8 , return true
[1,3,1,4,5] & K = 7 , return false

Solved Using HashSet, just after interview realized that it can be solved using sliding window, neither interviewer told me to optimize it further.

Interview completed in just 35 mins.

Comments