Facebook | Phone | LCA & Subarray Sum Equals K

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2020-07-15Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e5
Interview Stage: Phone Screen
Location: Seattle
Year: unknown

Original Post Content:

Position: E5
Location: Seattle

Question 1: https://www.***.org/lowest-common-ancestor-in-a-binary-tree-set-2-using-parent-pointer/
Question 2: https://leetcode.com/problems/subarray-sum-equals-k/ (it was a simpler version of this, just determine if such a subarray exists or not).

For both questions, I came up with a solution quickly, discussed space and time complexities, walked through test cases and discussed optimizations.
Interviewer indicated she was satisfied, but I was still rejected.

Comments