Cracking Meta's Software Engineer Intern Interview: BFS for Binary Trees & More

meta | Software Engineer | Interview Experience

Interview Date: Not specified
Result: Passed
Difficulty: Not specified

Interview Process

The interview consisted of one technical round lasting 45 minutes. The candidate was asked two questions.

Technical Questions

  • Binary Tree Maximum Width: Calculate the maximum width of a binary tree excluding null nodes. The candidate was expected to solve this using Breadth-First Search (BFS) and a queue, keeping track of the queue size for each level of the binary tree. Only non-null nodes should be added to the queue, and the maximum queue size will be the result.
  • Pow(x, n): Implement the function to calculate x raised to the power of n. LeetCode Problem

Tips & Insights

The interviewer was very busy, which may have impacted the flow of the interview.