Preparing for an interview? Check out Cracking the Coding Interview
Published on

Meta Phone Screen Round

Author
  • Shared Anonymously

I was asked two questions, both were from Facebook Top 50

  1. Buildings with ocean view
  2. Lowest Common Ancestor 3

For both questions, this was the format how I answered

  1. Slowly re-iterated the question back & just tried to understand the given examples.
  2. Asked some doubts over given input & expected output, constraints and missing info in problem.
  3. Asked for 1-2 min to gather my thoughts & kept speaking my mind/ideas loud. I was just thinking, what is the most simple way to solve this problem?.
  4. Once I formulated the basic brute force idea, I summarized my approach verbally & also confirmed it by dry running 1-2 examples.
  5. Told the time & space complexity.

(after this interviewer asked me to improve on time/space complexities)

  1. I highlighted the bottlenecks / repeated / duplicate work in my previous approach & how we can overcome them.
  2. Told the improved time/space complexities & then performed dry run with 1-2 examples to be sure new approach works.

(after this interviewer agreed on new improved approach & asked me to proceed with coding)

  1. I started coding my solution & paid attention to variable naming.

  2. I was thinking loud while coding each line (I was just recalling the purpose of each line, what it does & why it was necessary).

  3. After coding, I again did 2-3 quick dry run with edge cases to ensure it was working as expected.

Things I missed (I realized them post interview)
After the final dry run with edge case step, I had few mins to spare but instead of focusing on refactoring, cleaning & improving code readability, I just told interviewer I was done.

Additional Info
Duration of interview = 60 mins.
First 5 mins intro, Last 5 mins for any questions, Core 40 mins for coding 2 solutions with optimal approach.

Feedback = Positive

ReportMark as Helpful