Meta Phone Screen
Summary
I had a phone screen with Meta where I was asked two coding problems: LeetCode 88 (Merge Sorted Array) and LeetCode 973 (K Closest Points to Origin). Despite solving both within the allotted time, I was rejected due to insufficient signal.
Full Experience
I had a phone screen with Meta. The interview consisted of two coding questions. The first question was related to LeetCode 88: Merge Sorted Array. A slight twist was that the lengths of the arrays were not explicitly given, only the arrays themselves. I stumbled a bit initially on how to calculate the number of elements in nums1 before realizing it could be derived from nums1.size() - nums2.size(). The interviewer gave me a small hint related to nums2's length, which helped me recover quickly. I solved it with O(n) time and O(1) space complexity.
The second question was LeetCode 973: K Closest Points to Origin. I immediately proposed the priority queue solution and discussed its time complexities. The interviewer then asked if there was a better way, so I mentioned the Quicksort-based (Quickselect) solution and its complexities. I was then asked to code the priority queue solution. During coding, I had some minor bracket-related typos which the interviewer pointed out.
I finished both problems in about 35 minutes. I was hoping for a positive result, but unfortunately, I received an update stating there wasn't enough signal to move forward. I'm quite disappointed in myself because I felt like these were relatively easy medium problems, and I still managed to bomb the phone screen. All the effort I put into preparation felt like it led to a quick rejection.
Interview Questions (2)
Given an array of points points, where points[i] = [xi, yi] represents a point on the X-Y plane, and an integer k, return the k closest points to the origin (0, 0). The distance between two points on the X-Y plane is the Euclidean distance. The answer can be returned in any order, and it's guaranteed to be unique.