Screening Round
Questions:
-
Given a list of Binary Tree Nodes, determine which one is the root.
- For this one the solution is straightforward in two passes: create a set for all the nodes that are currently children on the first pass. On the second pass, look for a node that is not in the set, and return it as the root.
-
Flight and Departure min cost which is heavily related to Q 121. The solution for this one is already discussed in several posts on this forum; I wasn’t able to finish it using the sliding window approach, but brute force was implemented at least.
Candidate's Approach
- For the first question, the candidate proposed a two-pass solution using a set to identify the root node.
- For the second question, the candidate attempted a brute force solution but struggled with the sliding window approach.
Interviewer's Feedback
The interviewer provided a lot of hints throughout both problems, indicating that the candidate needed assistance in understanding the problem descriptions.