https://leetcode.com/problems/merge-k-sorted-lists/
https://www.geeksforgeeks.org/external-sorting/
and it's literally called "merge sorted files" (page 175 of elements of programming interviews).
it is not so simple to regurgitate pre-learned answers when you alter a problem one small attribute at a time, in each case a different answer becomes optimal, thus you can see if the person understand what needs to be done or not