Meta E4 | Phone screen and Mock Interview

Anonymous User
1480
Dec 02, 2023

Phone Screen:

  1. https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii/description/
    Gave the most optimal solution without extra space, which is this one , but looks like this solution doesn't handle some edge cases which were asked as the below follow ups

    • What if one of the given nodes is a root node?
      • For this interviewer wanted me to detect if one of the input nodes is a root node and return null since root nodes don't have an ancestor
    • What if both the nodes are the same?
      • We have to check if they are equal and return the parent node before starting the loop
  2. https://leetcode.com/problems/basic-calculator-ii/description/
    Gave the most optimal solution without stack which is given in the editorial, but interviewer digged deep into why it works. Had to a dry run few examples multiple times until the interviewer was satisfied. They were also particular about variable naming which I didn't focus on due to limited time

Result : Passed. Recruiter sent an email 4 hours after the interview to schedule virtual onsite

Mock Interview:

  1. https://leetcode.com/problems/custom-sort-string/description/
    Gave a solution with a map storing frequencies. Also mentioned we could replace the frequency map with an integer array of 26. Was asked the below follow up:

    • What if the input contains both lowercase and upper case letters?
      • Answered saying we could store both the upper and lowercase characters in the map instead of frequencies, interviewer didn't say whether it was right or wrong. They abruptly ended the question and moved to the next one saying time exceeded
  2. https://leetcode.com/problems/valid-word-abbreviation/description/
    Gave the most optimal solution which is 2-pointer approach. Interviewer asked me to do a dryrun and no follow ups for this one.

Tips for phone screens with Meta

  • Just sort the facebook tagged questions by frequency and do as many as you can.
  • Make sure you thourougly understand the solution as they tend to dig deeper into each line of the code including variable names
Comments (7)