Facebook | USA | Senior ML Engineer | Phone | Diameter of binary tree | Valid palindrome
Anonymous User
5210

I was asked these two questions with variations in the Meta phone screening for Senior ML engineer-

  1. https://leetcode.com/problems/valid-palindrome/
  2. https://leetcode.com/problems/diameter-of-binary-tree/
  • For the first question, I thought out loud and was in the process of verifing cross-checking code through sample test cases when the interviewer mentioned an edge case I missed. It was with string input of '#@$', but I was able to correct it when pointed out. I was also asked space and time complexity here, mine was O(1) and O(N) respectively.
  • For the second question, I passed all edge cases and was asked to code variation for an N-ary tree which I was able to implement successfully. The interviewer asked me to write code for how client would interact with the API and my way to do that was not traditional. I created class object and was storing the answer in instance variable (self.ans) and returning that outside the function definition. I think I should've stuck to returning it in the function itself.

I got rejected. I've read posts where people were able to crack phone screens after answering just one question out of two with brute force and thought the bar for my phone screening was higher than usual as I felt pretty confident about being selected after the interview. Maybe because I was interviewing for a senior position?

Anyway, hard luck. :( The recruiter told me that the interviewer expected me to solve both questions flawlessly without any help from her. In retrospect, I think maybe instead of thinking out loud and working on solution with the interviewer, I should've tested my code rigorously myself silently before. But they mentioned in all webinars that one should talk out loud and explain code while writing, so honestly I think the expectation was unfair. I also practiced Top 50 questions list multiple times, but for phone screening I think I should've focussed on quality over quantity, and made sure I understood all possible test cases aspects of easy/medium problems before moving to harder ones.

Comments (19)