Facebook || Technical Screening
Anonymous User
2363

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

  • Merge three sorted arrays, input arrays can contains duplicates but sorted output list should not contains duplicate elements.
    Missed this edge case:
    A = [1];
    B= [];
    C = [];

Corrected shortly after interviewer points this.

  • 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 relaized that it can be solved using sliding window, neither interviewer told me to optimize it further.

Interview completed in just 35 mins.

Comments (6)