Round 1
Questions:
Question
- LeetCode 88: Merge Sorted Array (the lengths of the arrays were not given, just the arrays)
- Leetcode 973: K Closest Points to Origin
Candidate's Approach
- For the first question, the candidate initially struggled with calculating the number of elements in nums1 due to the absence of length information. After receiving a hint from the interviewer about using the length of nums2, the candidate quickly recovered and solved the problem using O(n) time and O(1) space.
- For the second question, the candidate proposed a priority queue solution and discussed its time complexities. When asked for a better approach, the candidate mentioned Quicksort. The candidate was then asked to code the priority queue solution but encountered some typos related to missing brackets.
Interviewer's Feedback
No feedback provided.