Facebook phone screen (and question)
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-10-29Added By Anonymous
Source: Link
Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
2 questions:
1) reversing layers of tree (for even depth normal order, for odd - reverse), return as list of layers
2) lowest common ancestor of 2 nodes for unordered binary tree
Solved and coded both, but rejected.
Want to ask, what can be cause: maybe not communicating well? I not asked constraints (but solved in linear time so it doesn't much matter) and not looked for example in a hurry in second task and started solving for ordered binary tree but then reformed, also in hurry forgot about parameters in function but then added. Can these facts be cause for rejecting?