Facebook Phone Screen | E5 | London
Anonymous User
1287

Recruiter reached out on LinkedIn , scheduled a phone screen one month later.

The interviewer was very nice - spent 5 minutes in introduction and asked about me. Then gave me a problem on Coderpad.

Problem [LC Medium] - Dot product of 2 sparse vectors with the most optimal approach

I suggested a dictioniary to store and multiply the vectors element-wise. He proceeded to dicuss the tradeoffs and asked to think of something different. Was able to suggest a list of list approach however with a O(n^2) for multiplication.
He prodded for any O(n) solution and this is where I got stumped. Got it down to O(nlogn) by using binary search. He had to give me a hint and I was able to get the O(n) solution.
Coded it out in 10 minutes, was able to provide the complexity analysis. Had discussion of various tradeoffs for different sizes of the two vectors and which one to chose for every situation.

Ended the session with 5 minutes talking about his work and projects.

Heard back from the recruiter after 4 days, got selected for the next rounds!

Comments (2)