Google L4 PhoneScreen
Anonymous User
1137

Company - Google
Stage - Phone Screen
Date - Jan 2025
Role offered - L4

Recruiter reached out to me towards the end of Nov. After initial discussions the phone screen was scheduled in the first week of Jan.

Question-> Given 2 lists and an integer k, find the first k integers from the first list, then take the first k elements from second list, if there is any element which is common then remove that element from the second list. Continue this process untill there is no intersection between first k elements from the first list and first k elements from the second list, return the second list.

0 < k <= +inf

I/P-
list1 - [1,2,3,4,5,6,7]
list2 - [1,3,7,6,2,7,8]
k = 3

O/P-
[7,6,7,8]

Gave a brute force solution initially and did a dry run(there was one mistake which I corrected during dry run). After that improved it to a O(N) solution and performed a dry run, rejected interviewer wanted to ask more questions but due to lack of tine couldn't do so.

Hope this helps.

P.S. - This was my first time giving an interview at a FAANG level company. This was hearbreaking💔 because I was able to solve the question optimally but was rejected because the interviewer wanted to ask more questions.

Uber experience - https://leetcode.com/discuss/interview-experience/6278271/Uber-OA-SE2

Comments (8)