Facebook | New Grad | Phone Screen | Pass
Anonymous User
1012

I got 3 questions. The first one was Dot Product of Two Sparse Vectors. I told the interviewer that I had seen it before so the question was changed to Lowest Common Ancestor in a BT. I told them I had seen it before as well. The interviewer said that was okay. I wrote up an optimal solution but I made the assumption that the two child nodes couldn't be the same since that was specificied in the leetcode question. Turns out they could be the same and the interviewer had to point that out. I panicked but fixed the bug decently quickly. The last question was a variation of Flatten a Multilevel LinkedList. Again I gave an optimal solution, but again I made an assumption based on the leetcode question and the interviewere had to point the bug out. Again I fixed it decently quickly. We were running out of time so we moved onto questions. I got my phone screen Friday, got the onsite invitation today (Monday). Questions below.

  1. https://leetcode.com/problems/dot-product-of-two-sparse-vectors/
  2. https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
  3. https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/
Comments (4)