- Published on
Meta Phone Screen Round
- Author
- Shared Anonymously
I was asked two questions, both were from Facebook Top 50
For both questions, this was the format how I answered
- Slowly re-iterated the question back & just tried to understand the given examples.
- Asked some doubts over given input & expected output, constraints and missing info in problem.
- 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?.
- Once I formulated the basic brute force idea, I summarized my approach verbally & also confirmed it by dry running 1-2 examples.
- Told the time & space complexity.
(after this interviewer asked me to improve on time/space complexities)
- I highlighted the bottlenecks / repeated / duplicate work in my previous approach & how we can overcome them.
- 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)
-
I started coding my solution & paid attention to variable naming.
-
I was thinking loud while coding each line (I was just recalling the purpose of each line, what it does & why it was necessary).
-
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