My Meta phone screen interview consisted of two coding challenges.
The first was a variation of the problem "Merge Sorted Array." Instead of two lists, there were three, and they could contain duplicates. The constraint was to use no extra space beyond the result array. My approach involved using three pointers to compare the numbers from each list. I appended the smallest number to the result and incremented the corresponding pointer, continuing until I found a number different from the last one appended. The interviewer was satisfied with my solution.
The second question involved finding overlapping ranges in two lists of integer ranges. Given input lists a and b, the goal was to find the combined, overlapping ranges. For example:
Input: a: {[1,2], [3,6]} b: {[4,5], [6,9], [10,12]}
Output: {[1,2], [3,9], [10,12]}
I correctly identified two use cases: non-overlapping ranges and overlapping ranges like [3,6] and [4,5]. However, I missed a use case where ranges extend due to the next value in either list a or b, such as the [6,9] example above. I ran out of time before I could fully solve this problem.