Round 1
Questions:
- Merge 3 sorted arrays with no duplicates allowed.
- Variant of 545.
For the first problem, the candidate used the approach of MergeTwo(MergeTwo(A, B), C)
. When asked for a single loop solution, the candidate explained a 3-pointer approach. The interviewer seemed satisfied with this explanation. Both approaches would have the same time and space complexities, but the single loop solution was noted to be cleaner.
For the second problem, the candidate was explaining their thought process when the interviewer provided a hint, which the candidate felt they would have figured out independently. The candidate finished coding and dry running the code while explaining time and space complexities.
Candidate's Approach
The candidate solved the first problem using a two-step merging approach and later explained a more optimized three-pointer method for a single loop solution. They provided insights into time and space complexities for both methods. For the second problem, they articulated their thought process and incorporated hints from the interviewer while coding.
Interviewer's Feedback
No feedback provided.